Compass - Java Search Engine Framework

Reference Documentation

Shay Banon (kimchy)

Alan Hardy

1.0.0

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
I. Compass::Core
1. Inroduction
1.1. Overview
1.2. Template and Callback
2. Configuration
2.1. Introduction
2.2. Programmatic Configuration
2.3. XML Configuration
2.3.1. Schema Based Configuration
2.3.2. DTD Based Configuration
2.4. Obtaining a Compass reference
3. Search Engine
3.1. Introduction
3.2. Alias, Resource and Property
3.3. Creating Resource and Property
3.3.1. Boosting Resource and Property
3.4. Analyzers
3.5. Index Structure
3.6. Transaction
3.6.1. Locking
3.6.2. read_committed
3.6.3. serializable
3.6.4. batch_insert
3.7. Optimizers
3.7.1. Scheduled Optimizers
3.7.2. Aggressive Optimizer
3.7.3. Adaptive Optimizer
3.7.4. Null Optimizer
4. OSEM - XML
4.1. Introduction
4.2. Searchable Classes
4.2.1. Implement a Default Constructor
4.2.2. Provide Property Identifier(s)
4.2.3. Declare Accessors and Mutators (Optional)
4.2.4. Implementing equals() and hashCode()
4.3. Mapping
4.3.1. compass-core-mapping
4.3.2. class
4.3.3. contract
4.3.4. id
4.3.5. property
4.3.6. analyzer
4.3.7. meta-data
4.3.8. component
4.3.9. reference
4.3.10. parent
4.3.11. constant
5. OSEM - Annotations
5.1. Introduction
5.2. Searchable Classes
5.2.1. Implement a Default Constructor
5.2.2. Provide Property Identifier(s)
5.2.3. Declare Accessors and Mutators (Optional)
5.2.4. Implementing equals() and hashCode()
5.3. Mapping Annotations
5.3.1. @Searchable
5.3.2. @SearchableId
5.3.3. @SearchableProperty
5.3.4. @SearchableComponent
5.3.5. @SearchableReference
5.4. Configuration Annotations
6. XSEM - Xml to Search Engine Mapping
6.1. Introduction
6.2. Xml Object
6.3. Xml Content Handling
6.4. Raw Xml Object
6.5. Mapping Definition
6.5.1. xml-object
6.5.2. xml-id
6.5.3. xml-property
6.5.4. xml-analyzer
6.5.5. xml-content
7. Resource Mapping
7.1. Introduction
7.2. Mapping Declaration
7.2.1. resource
7.2.2. resource-contract
7.2.3. resource-id
7.2.4. resource-property
7.2.5. resource-analyzer
8. Common Meta Data
8.1. Introduction
8.2. Commnon Meta Data Definition
8.3. Using the Definition
8.4. Commnon Meta Data Ant Task
9. Transaction
9.1. Introduction
9.2. Session Lifecycle
9.3. Local Transaction
9.4. JTA Synchronization Transaction
10. Working with objects
10.1. Introduction
10.2. Making Object/Resource Searchable
10.3. Loading an Object/Resource
10.4. Deleting an Object/Resource
10.5. Searching
10.5.1. Query String Syntax
10.5.2. CompassHits, CompassDetachedHits & CompassHitsOperations
10.5.3. CompassQuery and CompassQueryBuilder
10.5.4. CompassHighlighter
II. Compass::Vocabulary
11. Introduction
12. Dublin Core
III. Compass::Gps
13. Introduction
13.1. Overview
13.2. CompassGps
13.2.1. SingleCompassGps
13.2.2. DualCompassGps
13.3. CompassGpsDevice
13.3.1. MirrorDataChangesGpsDevice
13.4. Programmatic Configuration
13.5. Building a Gps Device
14. JDBC
14.1. Introduction
14.2. Mapping
14.2.1. ResultSet Mapping
14.2.2. Table Mapping
14.3. Mapping - MirrorDataChanges
14.3.1. ResultSet Mapping
14.3.2. Table Mapping
14.3.3. Jdbc Snapshot
14.4. Resource Mapping
14.5. Putting it All Together
15. Hibernate
15.1. Introduction
15.2. Configuration
15.3. Index Operation
15.4. Real Time Data Mirroring
16. JPA (Java Persistence API)
16.1. Introduction
16.2. Configuration
16.3. Index Operation
16.4. Real Time Data Mirroring
17. JDO (Java Data Objects)
17.1. Introduction
17.2. Configuration
17.3. Index Operation
17.4. Real Time Data Mirroring
18. OJB (Object Relational Broker)
18.1. Introduction
18.2. Index Operation
18.3. Real Time Data Mirroring
18.4. Configuration
19. iBatis
19.1. Introduction
19.2. Index Operation
19.3. Configuration
IV. Compass::Spring
20. Introduction
20.1. Overview
20.2. Compass Definition in Application Context
21. DAO Support
21.1. Dao and Template
22. Spring Transaction
22.1. Introduction
22.2. LocalTransaction
22.3. JTASyncTransaction
22.4. SpringSyncTransaction
22.5. CompassTransactionManager
23. Hibernate 3 Gps Device Support
23.1. Introduction
23.2. SpringHibernate3GpsDevice
24. OJB Gps Device Support
24.1. Introduction
24.2. SpringOjbGpsDevice
24.3. SpringOjbGpsDeviceInterceptor
25. Jdbc Gps Device Support
25.1. Introduction
25.2. ResultSet Mapping
25.3. Table Mapping
26. Spring AOP
26.1. Introduction
26.2. Advices
26.3. Dao Sample
26.4. Transactional Serivce Sample
27. Spring MVC Support
27.1. Introduction
27.2. Support Classes
27.3. Index Controller
27.4. Search Controller
V. Compass::Samples
28. Library Sample
28.1. Intoduction
28.2. Running The Sample
29. Petclinic Sample
29.1. Introduction
29.2. Running The Sample
29.3. Data Model In Petclinic
29.3.1. Common Meta-data (Optional)
29.3.2. Resource Mapping
29.3.3. OSEM
29.4. Data Access In Petclinic
29.4.1. Hibernate
29.4.2. Apache OJB
29.4.3. JDBC
29.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