On 9/15/05, James Huang <[EMAIL PROTECTED]> wrote:
>
> Suppose I have a book index with field="publisher", field="title", etc.
> I want to search for books only from "Manning", do I have to do anything
> special? how?
>
add new BooleanClause(new TermQuery(new Term("publisher","Manning")), true,
I had to do something similar, but I plan on re-writing it into something
more elegant. I hope this helps give you some ideas.
1. Create a QueryFilter on only those items that matched the criteria (have
a required clause in your boolean query)
2. Create a BitFilter which takes a BitSet from step
To add to other comments:
This functionality should also look at how common a term is in the corpus.
Using the corpus as "correct" set of terms to search on isn't always what
you want if the corpus is unclean (misspellings, etc.)
I believe this is why if you search on an uncommon term, Google w