Compass - Java Search Engine Framework

Reference Documentation

Authors

Shay Banon (kimchy), Alan Hardy

1.1M3

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. Lucene Directory Wrapper
4.4.1. SyncMemoryMirrorDirectoryWrapperProvider
4.4.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. Direct Lucene
5.9.1. Wrappers
5.9.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 Analyzer
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. meta-data
6.6.8. dynamic-meta-data
6.6.9. component
6.6.10. reference
6.6.11. parent
6.6.12. 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-content
8. Resource 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
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. CompassHits, CompassDetachedHits & CompassHitsOperations
11.5.3. CompassQuery and CompassQueryBuilder
11.5.4. 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. 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.3. Index Operation
16.4. Real Time Data Mirroring
17. JPA (Java Persistence API)
17.1. Introduction
17.2. Configuration
17.3. Index Operation
17.4. Real Time Data Mirroring
18. JDO (Java Data Objects)
18.1. Introduction
18.2. Configuration
18.3. Index Operation
18.4. Real Time Data Mirroring
19. OJB (Object Relational Broker)
19.1. Introduction
19.2. Index Operation
19.3. Real Time Data Mirroring
19.4. Configuration
20. iBatis
20.1. Introduction
20.2. Index Operation
20.3. Configuration
IV. Compass Spring
21. Introduction
21.1. Overview
21.2. Compass Definition in Application Context
22. DAO Support
22.1. Dao and Template
23. Spring Transaction
23.1. Introduction
23.2. LocalTransaction
23.3. JTASyncTransaction
23.4. SpringSyncTransaction
23.5. CompassTransactionManager
24. Hibernate 3 Gps Device Support
24.1. Introduction
24.2. SpringHibernate3GpsDevice
25. OJB Gps Device Support
25.1. Introduction
25.2. SpringOjbGpsDevice
25.3. SpringOjbGpsDeviceInterceptor
26. Jdbc Gps Device Support
26.1. Introduction
26.2. ResultSet Mapping
26.3. Table Mapping
27. Spring AOP
27.1. Introduction
27.2. Advices
27.3. Dao Sample
27.4. Transactional Serivce Sample
28. Spring MVC Support
28.1. Introduction
28.2. Support Classes
28.3. Index Controller
28.4. Search Controller
V. Compass Samples
29. Library Sample
29.1. Introduction
29.2. Running The Sample
30. Petclinic Sample
30.1. Introduction
30.2. Running The Sample
30.3. Data Model In Petclinic
30.3.1. Common Meta-data (Optional)
30.3.2. Resource Mapping
30.3.3. OSEM
30.4. Data Access In Petclinic
30.4.1. Hibernate
30.4.2. Apache OJB
30.4.3. JDBC
30.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