On Jul 25, 2006, at 7:35 PM, Paulo Silveira wrote:

hey doron, I solved the problem with

for (String field : fields) {
        QueryParser qp = new QueryParser(field, SearchEngine.ANALYZER);
        fieldsQuery.add(qp.parse(string), BooleanClause.Occur.SHOULD);
}

I believe that this will cause difficulties with prohibited terms. Say you have these two documents...

    Doc 1:
       title: a
       body:  foo
    Doc 2:
       title: b
       body:  bar

How many hits do you get for the query 'a -foo'? The answer *should* be 0, since the presence of "foo" in the body should exclude doc 1. However, since the title matches against 'a -foo' ("a" is present, and "foo" is not), I believe you'll get a hit.

If you can solve that problem, and also return 1 hit for the query string "a +foo", let me know!

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to