Contents
preface
acknowledgments xvii
about this book xix
Part 1 Understanding Search Technology
- 1 State of the art
- What is search?
- Pitfalls of search engines in relational databases
- Full-text search: a promising solution
- Mismatches between the round object world
and the flat text world
- Summary
- 2 Getting started with Hibernate Search
- Requirements: what Hibernate Search needs
- Setting up Hibernate Search
- Mapping the domain model
- Indexing your data
- Querying your data
- Luke: inside look into Lucene indexes
- Summary
Part 2 Ending structural and
synchronization mismatches
- 3 Mapping simple data structures
- Why do we need mapping, again?
- Mapping entities
- Mapping properties
- Refining the mapping
- Summary
- 4 Mapping more advanced data structures
- Mapping the unexpected: custom bridges
- Mapping relationships between entities
- Summary
- 5 Indexing: where, how, what, and when
- DirectoryProvider: storing the index
- Analyzers: doors to flexibility
- Transparent indexing
- Indexing: when transparency is not enough
- Summary
Part 3 Taming the retrieval mismatch
- 6 Querying with Hibernate Search
- Understanding the query paradigm
- Building a Hibernate Search query
- Executing the full-text query
- Paginating through results and finding the tota
- Projection properties and metadata
- Manipulating the result structure
- Sorting results
- Overriding fetching strategy
- Understanding query results
- Summary
- 7 Writing a Lucene query
- Understanding Lucene’s query syntax
- Tokenization and fields
- Building custom queries programmatically
- Summary
- 8 Filters: cross-cutting restrictions
- Defining and using a filter
- Examples of filter usage and their implementation
- Summary
Part 4 Performance and scalability
- 9 Performance considerations
- Optimizing indexing
- Optimizing searches
- Optimizing the index structure
- Sharding your indexes
- Testing your Hibernate Search application
- Summary
- 10 Scalability: using Hibernate Search in a cluster
- Exploring clustering approaches
- Configuring slave nodes
- Configuring the master node
- Summary
- 11 Accessing Lucene natively
- Getting to the bottom of Hibernate Search
- Obtaining and using a Lucene IndexReader
within the framework
- Writing a DirectoryProvider your way
- Projecting your will on indexes
- Summary
Part 5 Native Lucene, scoring,
and the wheel
- 12 Document ranking
- Scoring documents
- Exploring Lucene’s scoring approach
and the DefaultSimilarity class
- Scoring things my way
- Document relevance
- Summary
- 13 Don’t reinvent the wheel
- Playing in the Sandbox
- Making use of third-party contributions
- Processing XML
- Summary
appendix Quick reference
index