On 11/9/06, ltaylor.employon <[EMAIL PROTECTED]> wrote:
I am currently evaluating Lucene to see if it would be appropriate to
replace my company's current search software. So far everything has been
looking great, however there is one requirement that I am not too certain
about.
What we need to do is to be able to store a bit mask specifying various
filter flags for a document in the index and then search this field by
specifying another bit mask with desired filters, returning documents that
have any of the specified flags set. In other words, we are doing a bitwise
OR on the stored filter bit mask and the specified filter bit mask and if it
is non-zero, we want to return the document.
Lucene maintains an inverted index, so you don't need a bit mask...
you can actually use symbolic values.
doc {
id=1
tags = tag1 tag3 tag7
}
doc {
id = 2
tags = tag1 tag2 tag5 tag9
}
Then you can search via a BooleanQuery:
tags:(tag1 OR tag2 OR tag7)
If you are new to Lucene, you might check out Solr first. If nothing
else, it would be a gentle introduction to Lucene, and you could build
a custom Lucene implementation later if it doesn't meet your needs.
-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server