lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Laferriere <spongeb...@icloud.com>
Subject Re: Over-ride q.op setting at query time
Date Thu, 01 May 2014 18:38:44 GMT
When using query screen:

1. chocolate cake results in following:
<str name="parsedquery_toString">+(((Category2Name:chocol^40.0 | ManfProdNum:chocolate
| ProductNumber:chocolate | ProductName:chocol^100.0 | Category3Name:chocol^80.0 | Category4Name:chocol^80.0
| Keywords:chocol^300.0 | ProductNameGrams:chocolate^100.0 | Category1Name:chocol) (Category2Name:cake^40.0
| ManfProdNum:cake | ProductNumber:cake | ProductName:cake^100.0 | Category3Name:cake^80.0
| Category4Name:cake^80.0 | Keywords:cake^300.0 | ProductNameGrams:cake^100.0 | Category1Name:cake))~2)
(ProductName:"chocol cake"^100.0) (Keywords:"chocol cake"^300.0) (ProductNameGrams:"chocolate
cake"^75.0) (Keywords:"chocol cake"^100.0)</str>
  
2. chocolate OR cake results in following:
<str name="parsedquery_toString">+((Category2Name:chocol^40.0 | ManfProdNum:chocolate
| ProductNumber:chocolate | ProductName:chocol^100.0 | Category3Name:chocol^80.0 | Category4Name:chocol^80.0
| Keywords:chocol^300.0 | ProductNameGrams:chocolate^100.0 | Category1Name:chocol) (Category2Name:cake^40.0
| ManfProdNum:cake | ProductNumber:cake | ProductName:cake^100.0 | Category3Name:cake^80.0
| Category4Name:cake^80.0 | Keywords:cake^300.0 | ProductNameGrams:cake^100.0 | Category1Name:cake))
(ProductName:"chocol cake"^100.0) (Keywords:"chocol cake"^300.0) (ProductNameGrams:"chocolate
cake"^75.0) (Keywords:"chocol cake"^100.0)</str>
  

3. if I remove q.op=AND to default to chocolate or cake:
<str name="parsedquery_toString">+((Category2Name:chocol^40.0 | ManfProdNum:chocolate
| ProductNumber:chocolate | ProductName:chocol^100.0 | Category3Name:chocol^80.0 | Category4Name:chocol^80.0
| Keywords:chocol^300.0 | ProductNameGrams:chocolate^100.0 | Category1Name:chocol) (Category2Name:cake^40.0
| ManfProdNum:cake | ProductNumber:cake | ProductName:cake^100.0 | Category3Name:cake^80.0
| Category4Name:cake^80.0 | Keywords:cake^300.0 | ProductNameGrams:cake^100.0 | Category1Name:cake))
(ProductName:"chocol cake"^100.0) (Keywords:"chocol cake"^300.0) (ProductNameGrams:"chocolate
cake"^75.0) (Keywords:"chocol cake"^100.0)</str>

The parsed queries are identical, do you know where the “AND” and “OR” logic would
show up in debugQuery? I would expect the same results from the query for #2 and #3 but get
different results.

-Bob






On May 1, 2014, at 12:27 PM, Ahmet Arslan <iorixxx@yahoo.com> wrote:

> 
> 
> Hi Bob,
> 
> Can you paste output of debugQuery=true?
> 
> 
> On Thursday, May 1, 2014 8:00 PM, Bob Laferriere <spongebobl@icloud.com> wrote:
> 
> I have set q.op=AND in solrconfig.xml and use edismax. I see the match as I would expect
except when I explicitly try to add binary logic. When I type 
> 
> termA OR term B
> 
> I am still getting the results of termA AND termB.
> 
> Am I being stupid or is this just not possible?
> 
> Thanks,
> 
> -Bob


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message