MainOverviewWikiIssuesForumBuildFisheye

Compass - Java Search Engine Framework

Reference Documentation

Authors

Shay Banon (kimchy), Alan Hardy

2.1.4

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/JSON Configuration
3.2.1. Schema Based Configuration
3.2.2. JSON Based Configuration
3.2.3. DTD Based Configuration
3.3. Obtaining a Compass reference
3.4. Rebuilding Compass
3.5. 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. Similarity
5.5. Query Parser
5.6. Index Structure
5.7. Transaction
5.7.1. Locking
5.7.2. Isolation
5.7.2.1. read_committed
5.7.2.2. serializable
5.7.2.3. lucene
5.7.3. Transaction Log
5.7.3.1. Ram Transaction Log
5.7.3.2. FS Transaction Log
5.8. All Support
5.9. Sub Index Hashing
5.9.1. Constant Sub Index Hashing
5.9.2. Modulo Sub Index Hashing
5.9.3. Custom Sub Index Hashing
5.10. Optimizers
5.10.1. Scheduled Optimizers
5.10.2. Aggressive Optimizer
5.10.3. Adaptive Optimizer
5.10.4. Null Optimizer
5.11. Merge
5.11.1. Merge Policy
5.11.2. Merge Scheduler
5.12. Index Deletion Policy
5.13. Spell Check / Did You Mean
5.13.1. Spell Index
5.14. Direct Lucene
5.14.1. Wrappers
5.14.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.8.1. Component Prefix
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. Converters
7.5.2. xml-object
7.5.3. xml-id
7.5.4. xml-property
7.5.5. xml-analyzer
7.5.6. xml-boost
7.5.7. xml-content
8. JSEM - JSOM to Search Engine Mapping
8.1. Introduction
8.2. JSON API Abstraction
8.3. Content Mapping
8.4. Raw Json Object
8.5. Mapping Definitions
8.5.1. root-json-object
8.5.2. json-id
8.5.3. json-property
8.5.4. json-object
8.5.5. json-array
8.5.6. json-content
8.5.7. json-boost
8.5.8. json-analyzer
9. RSEM - Resource/Search Engine 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
9.2.6. resource-boost
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
11.5. XA 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. Query String - Range Queries Extensions
12.5.3. CompassHits, CompassDetachedHits & CompassHitsOperations
12.5.4. CompassQuery and CompassQueryBuilder
12.5.5. Terms and Frequencies
12.5.6. CompassSearchHelper
12.5.7. 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. Parallel Device
15.6. 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. Embedded Hibernate
17.1. Introduction
17.2. Configuration
17.3. Transaction Management
18. Hibernate
18.1. Introduction
18.2. Configuration
18.2.1. Deprecated Hibernate Devices
18.2.1.1. Configuration
18.3. Index Operation
18.4. Real Time Data Mirroring
18.5. HibernateSyncTransaction
18.6. Hibernate Transaction Interceptor
19. JPA (Java Persistence API)
19.1. Introduction
19.2. Configuration
19.3. Index Operation
19.4. Real Time Data Mirroring
20. Embedded OpenJPA
20.1. Introduction
20.2. Configuration
20.3. Index Operation
20.4. Real Time Data Mirroring
20.5. OpenJPA Helper
21. Embedded TopLink Essentials
21.1. Introduction
21.2. Configuration
21.3. Transaction Management
22. Embedded EclipseLink
22.1. Introduction
22.2. Configuration
22.3. Transaction Management
23. JDO (Java Data Objects)
23.1. Introduction
23.2. Configuration
23.3. Index Operation
23.4. Real Time Data Mirroring
24. OJB (Object Relational Broker)
24.1. Introduction
24.2. Index Operation
24.3. Real Time Data Mirroring
24.4. Configuration
25. iBatis
25.1. Introduction
25.2. Index Operation
25.3. Configuration
IV. Compass Spring
26. Introduction
26.1. Overview
26.2. Compass Definition in Application Context
27. DAO Support
27.1. Dao and Template
28. Spring Transaction
28.1. Introduction
28.2. LocalTransaction
28.3. JTASyncTransaction
28.4. SpringSyncTransaction
28.5. CompassTransactionManager
29. Hibernate 3 Gps Device Support
29.1. Deprecation Note
29.2. Introduction
29.3. SpringHibernate3GpsDevice
30. OJB Gps Device Support
30.1. Introduction
30.2. SpringOjbGpsDevice
30.3. SpringOjbGpsDeviceInterceptor
31. Jdbc Gps Device Support
31.1. Introduction
31.2. ResultSet Mapping
31.3. Table Mapping
32. Spring AOP
32.1. Introduction
32.2. Advices
32.3. Dao Sample
32.4. Transactional Serivce Sample
33. Spring MVC Support
33.1. Introduction
33.2. Support Classes
33.3. Index Controller
33.4. Search Controller
V. Compass Needle
34. GigaSpaces
34.1. Overview
34.2. Lucene Directory
34.3. Compass Store
34.4. Searchable Space (Using Mirror Service)
34.5. Searchable Space (Using Embedded Service)
35. Coherence
35.1. Overview
35.2. Lucene Directory
35.3. Compass Store
35.4. Compass Cache Store
36. Terracotta
36.1. Overview
36.2. Lucene Directory
36.3. Compass Store
VI. Compass Samples
37. Library Sample
37.1. Introduction
37.2. Running The Sample
38. Petclinic Sample
38.1. Introduction
38.2. Running The Sample
38.3. Data Model In Petclinic
38.3.1. Common Meta-data (Optional)
38.3.2. Resource Mapping
38.3.3. OSEM
38.4. Data Access In Petclinic
38.4.1. Hibernate
38.4.2. Apache OJB
38.4.3. JDBC
38.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