MainOverviewWikiIssuesForumBuildFisheye

Compass - Java Search Engine Framework

Reference Documentation

Authors

Shay Banon (kimchy), Alan Hardy

1.2.1

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

Table of Contents

Preface
1. Introduction
1.1. Overview
1.2. I use ...
1.2.1. ... Lucene
1.2.2. ... Domain Model
1.2.3. ... Xml Model
1.2.4. ... No Model
1.2.5. ... ORM Framework
1.2.6. ... Spring Framework
I. Compass Core
2. Introduction
2.1. Overview
2.2. Session Lifecycle
2.3. Template and Callback
3. Configuration
3.1. Programmatic Configuration
3.2. XML Configuration
3.2.1. Schema Based Configuration
3.2.2. DTD Based Configuration
3.3. Obtaining a Compass reference
4. Connection
4.1. File System Store
4.2. RAM Store
4.3. Jdbc Store
4.3.1. Managed Environment
4.3.2. Data Source Provider
4.3.2.1. Driver Manager
4.3.2.2. Jakarta Commons DBCP
4.3.2.3. c3p0
4.3.2.4. JNDI
4.3.2.5. External
4.3.3. File Entry Handler
4.3.4. DDL
4.4. Lock Factory
4.5. Local Directory Cache
4.6. Lucene Directory Wrapper
4.6.1. SyncMemoryMirrorDirectoryWrapperProvider
4.6.2. AsyncMemoryMirrorDirectoryWrapperProvider
5. Search Engine
5.1. Introduction
5.2. Alias, Resource and Property
5.2.1. Using Resource/Property
5.3. Analyzers
5.3.1. Configuring Analyzers
5.3.2. Analyzer Filter
5.3.3. Handling Synonyms
5.4. Query Parser
5.5. Index Structure
5.6. Transaction
5.6.1. Locking
5.6.2. Isolation
5.6.2.1. read_committed
5.6.2.2. serializable
5.6.2.3. batch_insert
5.6.3. Transaction Log
5.6.3.1. Ram Transaction Log
5.6.3.2. FS Transaction Log
5.7. Sub Index Hashing
5.7.1. Constant Sub Index Hashing
5.7.2. Modulo Sub Index Hashing
5.7.3. Custom Sub Index Hashing
5.8. Optimizers
5.8.1. Scheduled Optimizers
5.8.2. Aggressive Optimizer
5.8.3. Adaptive Optimizer
5.8.4. Null Optimizer
5.9. Index Deletion Policy
5.10. Direct Lucene
5.10.1. Wrappers
5.10.2. Searcher And IndexReader
6. OSEM - Object/Search Engine Mapping
6.1. Introduction
6.2. Searchable Classes
6.2.1. Alias
6.2.2. Root
6.2.3. Sub Index
6.3. Searchable Class Mappings
6.3.1. Searchable Id and Searchable Meta Data
6.3.2. Searchable Property and Searchable Meta Data
6.3.3. Searchable Constant
6.3.4. Searchable Dynamic Meta Data
6.3.5. Searchable Reference
6.3.6. Searchable Component
6.3.7. Searchable Parent
6.3.8. Searchable Analyzer
6.3.9. Searchable Boost
6.4. Specifics
6.4.1. Handling Collection Types
6.4.2. Managed Id
6.4.3. Handling Inheritance
6.4.4. Polymorphic Relationships
6.4.5. Cyclic Relationships
6.4.6. Annotations and Xml Combined
6.4.7. Support Unmarshall
6.4.8. Configuration Annotations
6.5. Searchable Annotations Reference
6.6. Searchable Xml Reference
6.6.1. compass-core-mapping
6.6.2. class
6.6.3. contract
6.6.4. id
6.6.5. property
6.6.6. analyzer
6.6.7. boost
6.6.8. meta-data
6.6.9. dynamic-meta-data
6.6.10. component
6.6.11. reference
6.6.12. parent
6.6.13. constant
7. XSEM - Xml to Search Engine Mapping
7.1. Introduction
7.2. Xml Object
7.3. Xml Content Handling
7.4. Raw Xml Object
7.5. Mapping Definition
7.5.1. xml-object
7.5.2. xml-id
7.5.3. xml-property
7.5.4. xml-analyzer
7.5.5. xml-boost
7.5.6. xml-content
8. RSEM - Resource/Search Engine Mapping
8.1. Introduction
8.2. Mapping Declaration
8.2.1. resource
8.2.2. resource-contract
8.2.3. resource-id
8.2.4. resource-property
8.2.5. resource-analyzer
8.2.6. resource-boost
9. Common Meta Data
9.1. Introduction
9.2. Commnon Meta Data Definition
9.3. Using the Definition
9.4. Commnon Meta Data Ant Task
10. Transaction
10.1. Introduction
10.2. Session Lifecycle
10.3. Local Transaction
10.4. JTA Synchronization Transaction
10.5. XA Transaction
11. Working with objects
11.1. Introduction
11.2. Making Object/Resource Searchable
11.3. Loading an Object/Resource
11.4. Deleting an Object/Resource
11.5. Searching
11.5.1. Query String Syntax
11.5.2. Query String - Range Queries Extensions
11.5.3. CompassHits, CompassDetachedHits & CompassHitsOperations
11.5.4. CompassQuery and CompassQueryBuilder
11.5.5. Terms and Frequencies
11.5.6. CompassSearchHelper
11.5.7. CompassHighlighter
II. Compass Vocabulary
12. Introduction
13. Dublin Core
III. Compass Gps
14. Introduction
14.1. Overview
14.2. CompassGps
14.2.1. SingleCompassGps
14.2.2. DualCompassGps
14.3. CompassGpsDevice
14.3.1. MirrorDataChangesGpsDevice
14.4. Programmatic Configuration
14.5. Parallel Device
14.6. Building a Gps Device
15. JDBC
15.1. Introduction
15.2. Mapping
15.2.1. ResultSet Mapping
15.2.2. Table Mapping
15.3. Mapping - MirrorDataChanges
15.3.1. ResultSet Mapping
15.3.2. Table Mapping
15.3.3. Jdbc Snapshot
15.4. Resource Mapping
15.5. Putting it All Together
16. Hibernate
16.1. Introduction
16.2. Configuration
16.2.1. Deprecated Hibernate Devices
16.2.1.1. Configuration
16.3. Index Operation
16.4. Real Time Data Mirroring
16.5. HibernateSyncTransaction
16.6. Hibernate Transaction Interceptor
17. JPA (Java Persistence API)
17.1. Introduction
17.2. Configuration
17.3. Index Operation
17.4. Real Time Data Mirroring
18. Embedded OpenJPA
18.1. Introduction
18.2. Configuration
18.3. Index Operation
18.4. Real Time Data Mirroring
18.5. OpenJPA Helper
19. JDO (Java Data Objects)
19.1. Introduction
19.2. Configuration
19.3. Index Operation
19.4. Real Time Data Mirroring
20. OJB (Object Relational Broker)
20.1. Introduction
20.2. Index Operation
20.3. Real Time Data Mirroring
20.4. Configuration
21. iBatis
21.1. Introduction
21.2. Index Operation
21.3. Configuration
IV. Compass Spring
22. Introduction
22.1. Overview
22.2. Compass Definition in Application Context
23. DAO Support
23.1. Dao and Template
24. Spring Transaction
24.1. Introduction
24.2. LocalTransaction
24.3. JTASyncTransaction
24.4. SpringSyncTransaction
24.5. CompassTransactionManager
25. Hibernate 3 Gps Device Support
25.1. Deprecation Note
25.2. Introduction
25.3. SpringHibernate3GpsDevice
26. OJB Gps Device Support
26.1. Introduction
26.2. SpringOjbGpsDevice
26.3. SpringOjbGpsDeviceInterceptor
27. Jdbc Gps Device Support
27.1. Introduction
27.2. ResultSet Mapping
27.3. Table Mapping
28. Spring AOP
28.1. Introduction
28.2. Advices
28.3. Dao Sample
28.4. Transactional Serivce Sample
29. Spring MVC Support
29.1. Introduction
29.2. Support Classes
29.3. Index Controller
29.4. Search Controller
V. Compass Samples
30. Library Sample
30.1. Introduction
30.2. Running The Sample
31. Petclinic Sample
31.1. Introduction
31.2. Running The Sample
31.3. Data Model In Petclinic
31.3.1. Common Meta-data (Optional)
31.3.2. Resource Mapping
31.3.3. OSEM
31.4. Data Access In Petclinic
31.4.1. Hibernate
31.4.2. Apache OJB
31.4.3. JDBC
31.5. Web (MVC) in Petclinic
VI. Appendixes
A. Configuration Settings
A.1. Compass Configuration Settings
A.1.1. compass.engine.connection
A.1.2. JNDI
A.1.3. Property
A.1.4. Transaction Level
A.1.5. Transaction Strategy
A.1.6. Property Accessor
A.1.7. Converters
A.1.8. Search Engine
A.1.9. Search Engine Jdbc
A.1.9.1. Data Source Providers
A.1.9.2. File Entry Handlers
A.1.10. Search Engine Analyzers
A.1.11. Search Engine Analyzer Filters
A.1.12. Search Engine Highlighters
A.1.13. Other Settings
B. Lucene Jdbc Directory
B.1. Overview
B.2. Performance Notes
B.3. Transaction Management
B.3.1. Auto Commit Mode
B.3.2. DataSource Transaction Management
B.3.3. Using External Transaction Manager
B.3.4. DirectoryTemplate
B.4. File Entry Handler
B.4.1. IndexInput Types
B.4.2. IndexOutput Types