: I'm interested in using Solr with a custom Lucene Filter (like the one 
: described in section 6.4.1 of the Lucene In Action, Second Edition 
: book).  I'd like to filter search results from a Lucene index against 
: information stored in a relational database.  I don't want to move the 
: relational database information into the search index, because it could 
: change frequently.

One approach would be to subclass the either the QueryComponent or the 
SearchHandler and generate a DocSet from your external data source that 
you specify as a filter before QueryComponent executes the search.

The other possibility would be to write a QParserPlugin that generated a 
Query which when executed uses the index only to get the 
fieldCache for docId->uniqueKey mappings, and decides what documents to 
match based entirely on your external datasource.  then you can use the 
"fq" param to trigger your custom parser and Solr will use the DocSet 
produced as a filter.


-Hoss

Reply via email to