Compass - Java Search Engine Framework

Reference Documentation

Authors

Shay Banon (kimchy), Alan Hardy

1.1M1

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. 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. Index Structure
5.5. Transaction
5.5.1. Locking
5.5.2. read_committed
5.5.3. serializable
5.5.4. batch_insert
5.6. Sub Index Hashing
5.6.1. Constant Sub Index Hashing
5.6.2. Modulo Sub Index Hashing
5.6.3. Custom Sub Index Hashing
5.7. Optimizers
5.7.1. Scheduled Optimizers
5.7.2. Aggressive Optimizer
5.7.3. Adaptive Optimizer
5.7.4. Null Optimizer
5.8. Direct Lucene
5.8.1. Wrappers
5.8.2. Searcher And IndexReader
6. OSEM - XML
6.1. Introduction
6.2. Searchable Classes
6.2.1. Implement a Default Constructor
6.2.2. Provide Property Identifier(s)
6.2.3. Declare Accessors and Mutators (Optional)
6.2.4. Implementing equals() and hashCode()
6.3. Mapping
6.3.1. compass-core-mapping
6.3.2. class
6.3.3. contract
6.3.4. id
6.3.5. property
6.3.6. analyzer
6.3.7. meta-data
6.3.8. component
6.3.9. reference
6.3.10. parent
6.3.11. constant
7. OSEM - Annotations
7.1. Introduction
7.2. Searchable Classes
7.2.1. Implement a Default Constructor
7.2.2. Provide Property Identifier(s)
7.2.3. Declare Accessors and Mutators (Optional)
7.2.4. Implementing equals() and hashCode()
7.3. Mapping Annotations
7.3.1. @Searchable
7.3.2. @SearchableId
7.3.3. @SearchableProperty
7.3.4. @SearchableComponent
7.3.5. @SearchableReference
7.4. Configuration Annotations
8. XSEM - Xml to Search Engine Mapping
8.1. Introduction
8.2. Xml Object
8.3. Xml Content Handling
8.4. Raw Xml Object
8.5. Mapping Definition
8.5.1. xml-object
8.5.2. xml-id
8.5.3. xml-property
8.5.4. xml-analyzer
8.5.5. xml-content
9. Resource Mapping
9.1. Introduction
9.2. Mapping Declaration
9.2.1. resource
9.2.2. resource-contract
9.2.3. resource-id
9.2.4. resource-property
9.2.5. resource-analyzer
10. Common Meta Data
10.1. Introduction
10.2. Commnon Meta Data Definition
10.3. Using the Definition
10.4. Commnon Meta Data Ant Task
11. Transaction
11.1. Introduction
11.2. Session Lifecycle
11.3. Local Transaction
11.4. JTA Synchronization Transaction
12. Working with objects
12.1. Introduction
12.2. Making Object/Resource Searchable
12.3. Loading an Object/Resource
12.4. Deleting an Object/Resource
12.5. Searching
12.5.1. Query String Syntax
12.5.2. CompassHits, CompassDetachedHits & CompassHitsOperations
12.5.3. CompassQuery and CompassQueryBuilder
12.5.4. CompassHighlighter
II. Compass Vocabulary
13. Introduction
14. Dublin Core
III. Compass Gps
15. Introduction
15.1. Overview
15.2. CompassGps
15.2.1. SingleCompassGps
15.2.2. DualCompassGps
15.3. CompassGpsDevice
15.3.1. MirrorDataChangesGpsDevice
15.4. Programmatic Configuration
15.5. Building a Gps Device
16. JDBC
16.1. Introduction
16.2. Mapping
16.2.1. ResultSet Mapping
16.2.2. Table Mapping
16.3. Mapping - MirrorDataChanges
16.3.1. ResultSet Mapping
16.3.2. Table Mapping
16.3.3. Jdbc Snapshot
16.4. Resource Mapping
16.5. Putting it All Together
17. Hibernate
17.1. Introduction
17.2. Configuration
17.3. Index Operation
17.4. Real Time Data Mirroring
18. JPA (Java Persistence API)
18.1. Introduction
18.2. Configuration
18.3. Index Operation
18.4. Real Time Data Mirroring
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. Introduction
25.2. 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