Advanced Search With Lucene
Advanced Search With Lucene
Lucene
Presenters
Chris Pliakas – Engineer
Erich Beyrent – VP of Engineering
http://www.commonplaces.com
Presentation Summary
Advanced query Syntax
High-performance, scalable
Ability to add custom facets
Multisite search, content not shared
Managed through Drupal admin interface
Analysis of the Core Search
Pros:
Good API ... for the most part
Pure PHP solution
Works out of the box
Cons:
Elementary query syntax
Not scalable
No good method to alter query
Adding facets is unwieldy
What is Lucene?
is ...
An open source text search library written in
High-performance and full featured
Supported by the Apache Software Foundation
Capabilities of Lucene
What is the Zend Framework?
Well documented, tested, E_STRICT compliant
ZF's Zend_Search_Lucene component
Object oriented PHP port of Lucene
Lucene index binary compatible with Java
Stripped down version of required components
Installation
Run !!
Hijacking the core search box
Error handling settings
Search Lucene Content settings
Configuring facets
Search Lucene API vs. Search vs. Apache Solr
Memory consumption
Page load time
Index maintenance operations
Improving Lucene Performance
Performance Settings
Search results caching
Result set limit
Index optimization
Maintaining Lucene With Drush
Who needs cron?
Performing common maintenance tasks
Retrieving index information
Updating “gotcha”
The future of Drush integration
Search Lucene API
Objects passed by reference
Exceptional error handling with Exceptions
Autoload implementation
Abstraction layer for common ZF objects
Faceted Search
Why the Facet API makes sense
hook_luceneapi_facet($op, $module, $type)
Handling facets via “facet handler” callback
How to $_GET facet values
Defining multiple facets in one hook.
Advanced facets on Twolia
How the Facet API Works
Index Hooks
Search Hooks
Memory intensive
Lack of an SMP solution
Lucene index on NFS volumes
Distributed indexes?
Search Lucene API 2.0
Addressing scalability
Process control extension
Forking the search processes
Index opened only once on startup
Drupal module becomes the application
Search Lucene API 2.0
New Features
User, help, multisite search
Result sorting
User defined weights and boost factors
Better index statistics
Improved caching mechanism
Recap
In Summary ...
Replace core search with Search Lucene API
Install, configure, and tune SLAPI modules
Maintain indexes via Drush
Use and extend Seach Lucene API
Search Lucene API
Questions
Thank you!
Presenters
Chris Pliakas – Engineer
Erich Beyrent – VP of Engineering
http://www.commonplaces.com