MainOverviewWikiIssuesForumBuildFisheye

Compass - Java Search Engine Framework

Reference Documentation

Authors

Shay Banon (kimchy), Alan Hardy

2.0.2

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
3.4. Configuring Callback Events
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. lucene
5.6.3. Transaction Log
5.6.3.1. Ram Transaction Log
5.6.3.2. FS Transaction Log
5.7. All Support
5.8. Sub Index Hashing
5.8.1. Constant Sub Index Hashing
5.8.2. Modulo Sub Index Hashing
5.8.3. Custom Sub Index Hashing
5.9. Optimizers
5.9.1. Scheduled Optimizers
5.9.2. Aggressive Optimizer
5.9.3. Adaptive Optimizer
5.9.4. Null Optimizer
5.10. Merge
5.10.1. Merge Policy
5.10.2. Merge Scheduler
5.11. Index Deletion Policy
5.12. Spell Check / Did You Mean
5.12.1. Spell Index
5.13. Direct Lucene
5.13.1. Wrappers
5.13.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 Id Component
6.3.3. Searchable Parent
6.3.4. Searchable Property and Searchable Meta Data
6.3.5. Searchable Constant
6.3.6. Searchable Dynamic Meta Data
6.3.7. Searchable Reference
6.3.8. Searchable Component
6.3.9. Searchable Cascade
6.3.10. Searchable Analyzer
6.3.11. 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. Embedded Hibernate
16.1. Introduction
16.2. Configuration
16.3. Transaction Management
17. Hibernate
17.1. Introduction
17.2. Configuration
17.2.1. Deprecated Hibernate Devices
17.2.1.1. Configuration
17.3. Index Operation
17.4. Real Time Data Mirroring
17.5. HibernateSyncTransaction
17.6. Hibernate Transaction Interceptor
18. JPA (Java Persistence API)
18.1. Introduction
18.2. Configuration
18.3. Index Operation
18.4. Real Time Data Mirroring
19. Embedded OpenJPA
19.1. Introduction
19.2. Configuration
19.3. Index Operation
19.4. Real Time Data Mirroring
19.5. OpenJPA Helper
20. Embedded TopLink Essentials
20.1. Introduction
20.2. Configuration
20.3. Transaction Management
21. Embedded EclipseLink
21.1. Introduction
21.2. Configuration
21.3. Transaction Management
22. JDO (Java Data Objects)
22.1. Introduction
22.2. Configuration
22.3. Index Operation
22.4. Real Time Data Mirroring
23. OJB (Object Relational Broker)
23.1. Introduction
23.2. Index Operation
23.3. Real Time Data Mirroring
23.4. Configuration
24. iBatis
24.1. Introduction
24.2. Index Operation
24.3. Configuration
IV. Compass Spring
25. Introduction
25.1. Overview
25.2. Compass Definition in Application Context
26. DAO Support
26.1. Dao and Template
27. Spring Transaction
27.1. Introduction
27.2. LocalTransaction
27.3. JTASyncTransaction
27.4. SpringSyncTransaction
27.5. CompassTransactionManager
28. Hibernate 3 Gps Device Support
28.1. Deprecation Note
28.2. Introduction
28.3. SpringHibernate3GpsDevice
29. OJB Gps Device Support
29.1. Introduction
29.2. SpringOjbGpsDevice
29.3. SpringOjbGpsDeviceInterceptor
30. Jdbc Gps Device Support
30.1. Introduction
30.2. ResultSet Mapping
30.3. Table Mapping
31. Spring AOP
31.1. Introduction
31.2. Advices
31.3. Dao Sample
31.4. Transactional Serivce Sample
32. Spring MVC Support
32.1. Introduction
32.2. Support Classes
32.3. Index Controller
32.4. Search Controller
V. Compass Needle
33. GigaSpaces
33.1. Overview
33.2. Lucene Directory
33.3. Compass Store
33.4. Searchable Space
34. Coherence
34.1. Overview
34.2. Lucene Directory
34.3. Compass Store
35. Terracotta
35.1. Overview
35.2. Lucene Directory
35.3. Compass Store
VI. Compass Samples
36. Library Sample
36.1. Introduction
36.2. Running The Sample
37. Petclinic Sample
37.1. Introduction
37.2. Running The Sample
37.3. Data Model In Petclinic
37.3.1. Common Meta-data (Optional)
37.3.2. Resource Mapping
37.3.3. OSEM
37.4. Data Access In Petclinic
37.4.1. Hibernate
37.4.2. Apache OJB
37.4.3. JDBC
37.5. Web (MVC) in Petclinic
VII. 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