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

2010-01-12 Thread Chris Hostetter

: 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



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

2010-01-07 Thread gunjan_versata


Hi All,

i have a document indexed in solr, which is as follow :

doc
str name=idP-E-HE-Philips-32PFL5409-98-Black-32/str
arr name=keywords
strPhilips/str
strLCD TVs/str
/arr
str name=title
Philips 32PFL5409-98  32 LCDTV withPixel Plus HD (Black,32)
/str
/doc

now when i search for lcd tvs, i dont the above doc in search results.. on
doing explain other, i got the following output.. 

   P-E-HE-Philips-32PFL5409-98-Black-32:
0.0 = (NON-MATCH) Failure to meet condition(s) of required/prohibited
clause(s)
  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)
0.0 = (NON-MATCH) Failure to match minimum number of optional clauses: 1
  0.91647065 = (MATCH) max of:
0.91647065 = (MATCH) weight(keywords:lcd tvs^0.5 in 40), product of:
  0.13178125 = queryWeight(keywords:lcd tvs^0.5), product of:
0.5 = boost
11.127175 = idf(docFreq=34, maxDocs=875476)
0.023686381 = queryNorm
  6.9544845 = (MATCH) fieldWeight(keywords:lcd tvs in 40), product of:
1.0 = tf(termFreq(keywords:lcd tvs)=1)
11.127175 = idf(docFreq=34, maxDocs=875476)
0.625 = fieldNorm(field=keywords, doc=40)

i am not sure of what it means? and if i can tweak it or not?  please not,
this score was more than the results which showed up...

Regards,
Gunjan

-- 
View this message in context: 
http://old.nabble.com/Meaning-of-this-error%3A-Failure-to-meet-condition%28s%29-of-required-prohibited-clause%28s%29tp27058008p27058008.html
Sent from the Solr - User mailing list archive at Nabble.com.



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

2010-01-07 Thread Erick Erickson
How are these fields defined in your schema.xml? Note
that String types are indexed without tokenization, so
if str is defined as a String field type, that may be
part of your problem (try text type if so).

If this is irrelevant, please show us the relevant parts
of your schema and the query you're submitting...

Erick

On Thu, Jan 7, 2010 at 6:17 AM, gunjan_versata gunjanga...@gmail.comwrote:



 Hi All,

 i have a document indexed in solr, which is as follow :

 doc
 str name=idP-E-HE-Philips-32PFL5409-98-Black-32/str
 arr name=keywords
 strPhilips/str
 strLCD TVs/str
 /arr
 str name=title
 Philips 32PFL5409-98  32 LCDTV withPixel Plus HD (Black,32)
 /str
 /doc

 now when i search for lcd tvs, i dont the above doc in search results.. on
 doing explain other, i got the following output..

   P-E-HE-Philips-32PFL5409-98-Black-32:
 0.0 = (NON-MATCH) Failure to meet condition(s) of required/prohibited
 clause(s)
  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)
0.0 = (NON-MATCH) Failure to match minimum number of optional clauses: 1
  0.91647065 = (MATCH) max of:
0.91647065 = (MATCH) weight(keywords:lcd tvs^0.5 in 40), product of:
  0.13178125 = queryWeight(keywords:lcd tvs^0.5), product of:
0.5 = boost
11.127175 = idf(docFreq=34, maxDocs=875476)
0.023686381 = queryNorm
  6.9544845 = (MATCH) fieldWeight(keywords:lcd tvs in 40), product of:
1.0 = tf(termFreq(keywords:lcd tvs)=1)
11.127175 = idf(docFreq=34, maxDocs=875476)
0.625 = fieldNorm(field=keywords, doc=40)

 i am not sure of what it means? and if i can tweak it or not?  please not,
 this score was more than the results which showed up...

 Regards,
 Gunjan

 --
 View this message in context:
 http://old.nabble.com/Meaning-of-this-error%3A-Failure-to-meet-condition%28s%29-of-required-prohibited-clause%28s%29tp27058008p27058008.html
 Sent from the Solr - User mailing list archive at Nabble.com.




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

2010-01-07 Thread gunjan_versata

I have defined a field type in schema.xml :

fieldType name=lowercase class=solr.TextField
positionIncrementGap=100
  analyzer
tokenizer class=solr.KeywordTokenizerFactory/
filter class=solr.LowerCaseFilterFactory /
filter class=solr.TrimFilterFactory /
filter class=solr.SnowballPorterFilterFactory language=English
protected=protwords.txt/
  /analyzer
/fieldType

field name=keywords type=lowercase indexed=true stored=true
multiValued=true/ 
field name=defaultKeywords type=lowercase indexed=true stored=true
multiValued=true/ 
field name=subKeywords type=textTight indexed=true stored=true
multiValued=true/

The other fields don't have lcd tvs in them.. 

And handler used is :

requestHandler name=product class=solr.DisMaxRequestHandler 
lst name=defaults
 str name=echoParamsexplicit/str
 str name=qf
title^0.7 contributors^0.2 keywords^0.5 defaultKeywords^1
subKeywords^0.1
 /str
 str name=pf
keywords^0.5 defaultKeywords^1
 /str
 str name=mm50%/str
/lst
/requestHandler

-Regards,
Gunjan


Erick Erickson wrote:
 
 How are these fields defined in your schema.xml? Note
 that String types are indexed without tokenization, so
 if str is defined as a String field type, that may be
 part of your problem (try text type if so).
 
 If this is irrelevant, please show us the relevant parts
 of your schema and the query you're submitting...
 
 Erick
 
 On Thu, Jan 7, 2010 at 6:17 AM, gunjan_versata
 gunjanga...@gmail.comwrote:
 


 Hi All,

 i have a document indexed in solr, which is as follow :

 doc
 str name=idP-E-HE-Philips-32PFL5409-98-Black-32/str
 arr name=keywords
 strPhilips/str
 strLCD TVs/str
 /arr
 str name=title
 Philips 32PFL5409-98  32 LCDTV withPixel Plus HD (Black,32)
 /str
 /doc

 now when i search for lcd tvs, i dont the above doc in search results..
 on
 doing explain other, i got the following output..

   P-E-HE-Philips-32PFL5409-98-Black-32:
 0.0 = (NON-MATCH) Failure to meet condition(s) of required/prohibited
 clause(s)
  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)
0.0 = (NON-MATCH) Failure to match minimum number of optional clauses:
 1
  0.91647065 = (MATCH) max of:
0.91647065 = (MATCH) weight(keywords:lcd tvs^0.5 in 40), product of:
  0.13178125 = queryWeight(keywords:lcd tvs^0.5), product of:
0.5 = boost
11.127175 = idf(docFreq=34, maxDocs=875476)
0.023686381 = queryNorm
  6.9544845 = (MATCH) fieldWeight(keywords:lcd tvs in 40), product of:
1.0 = tf(termFreq(keywords:lcd tvs)=1)
11.127175 = idf(docFreq=34, maxDocs=875476)
0.625 = fieldNorm(field=keywords, doc=40)

 i am not sure of what it means? and if i can tweak it or not?  please
 not,
 this score was more than the results which showed up...

 Regards,
 Gunjan

 --
 View this message in context:
 http://old.nabble.com/Meaning-of-this-error%3A-Failure-to-meet-condition%28s%29-of-required-prohibited-clause%28s%29tp27058008p27058008.html
 Sent from the Solr - User mailing list archive at Nabble.com.


 
 

-- 
View this message in context: 
http://old.nabble.com/Meaning-of-this-error%3A-Failure-to-meet-condition%28s%29-of-required-prohibited-clause%28s%29tp27058008p27071735.html
Sent from the Solr - User mailing list archive at Nabble.com.