: Subject: Meaning of this error: Failure to meet condition(s) of
:     required/prohibited clause(s)???

First of all: it's not an error -- it's a debuging statment generated when 
you asekd for an explanation of a document's score...

: 0.0 = (NON-MATCH) Failure to meet condition(s) of required/prohibited
: clause(s)

It means that you have a BooleanQuery with some required or prohibited 
clauses, and he document didn't meet that condition.

The nested explanations go into more detail, soo...

:   0.0 = no match on required clause (((subKeywords:lcd^0.1 |
: keywords:lcd^0.5 | defaultKeywords:lcd | contributors:lcd^0.5 | title:lcd)
: (subKeywords:televis^0.1 | keywords:tvs^0.5 | defaultKeywords:tvs |
: contributors:tvs^0.5 | (title:televis title:tv title:tvs)))~1)

that entire thing is a BooleanQuery which is a required clause 
of the "outer" BooleanQuery mentioned previously, and this 
document doesn't match it.  The nested explanation tells you why...

:     0.0 = (NON-MATCH) Failure to match minimum number of optional clauses: 1

...so there you go.  This BooleanQuery consists of two clauses which are 
each DisjunctionMaxQueries (one for lcd and one for tv) and the 
minNrShouldMatch property requires that at least one must match (that's 
the "~1" in the toString info above)

Based on another email where you provided some of your schema details (but 
not enough to get a clera picture of everything going on) the one thing i 
can tell you is why you didn't get a match on the "keywords" field even 
though it had the string "LCD TVs" ... the reason is because you are using 
the KeywordTokenizer which treats all of it's input as a single token -- 
but whitespace is markup for the QueryParser (just like quotes and +/-) 
... it chunks the input on whitespace boundaries before consulting the 
field analyzers, so it the resulting query doesn't search the keywords 
field for "lcd tvs" as a single string unless you include it in quotes.

(you do however see later in the score explanation that it is doing this, 
and finding a match, because you have keywords i the "pf" param, which 
constructs an implicit phrase query for your entire input string -- but 
this is only a boost, it can't help a document that doesn't match the qf 
fields in the first place).

-Hoss

Reply via email to