Re: Query Logic Question

2012-06-29 Thread Erick Erickson
I think you're assuming that this is Boolean logic. It's not, see:
http://www.lucidimagination.com/blog/2011/12/28/why-not-and-or-and-not/

Best
Erick

On Thu, Jun 28, 2012 at 9:27 AM, Rublex ruble...@hotmail.com wrote:
 Jack,

 Thank you the *:* solutions seems to work.

 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Query-Logic-Question-tp3991689p3991881.html
 Sent from the Solr - User mailing list archive at Nabble.com.


Re: Query Logic Question

2012-06-28 Thread Rublex
Jack,

Thank you the *:* solutions seems to work.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Query-Logic-Question-tp3991689p3991881.html
Sent from the Solr - User mailing list archive at Nabble.com.


Query Logic Question

2012-06-27 Thread Rublex
Hi,

Can someone explain to me please why these two queries return different
results:

1. -PaymentType:Finance AND -PaymentType:Lease AND -PaymentType:Cash *(700
results)*

2. (-PaymentType:Finance AND -PaymentType:Lease) AND -PaymentType:Cash *(0
results)*

Logically the two above queries should be return the same results no?

Thank you

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Query-Logic-Question-tp3991689.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Query Logic Question

2012-06-27 Thread Li Li
I think they are logically the same. but 1 may be a little bit faster than 2

On Thu, Jun 28, 2012 at 5:59 AM, Rublex ruble...@hotmail.com wrote:
 Hi,

 Can someone explain to me please why these two queries return different
 results:

 1. -PaymentType:Finance AND -PaymentType:Lease AND -PaymentType:Cash *(700
 results)*

 2. (-PaymentType:Finance AND -PaymentType:Lease) AND -PaymentType:Cash *(0
 results)*

 Logically the two above queries should be return the same results no?

 Thank you

 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Query-Logic-Question-tp3991689.html
 Sent from the Solr - User mailing list archive at Nabble.com.


Re: Query Logic Question

2012-06-27 Thread Jack Krupansky
It should work properly with the edismax query parser. The traditional 
lucene query parser is not smart enough about the fact that the Lucene 
BooleanQuery can't properly handle queries with only negative clauses.


Put *:* in front of all your negative terms and you will get similar 
results. edismax does that automatically.


(*:* -PaymentType:Finance AND *:* -PaymentType:Lease) AND 
*:* -PaymentType:Cash


-- Jack Krupansky

-Original Message- 
From: Rublex

Sent: Wednesday, June 27, 2012 4:59 PM
To: solr-user@lucene.apache.org
Subject: Query Logic Question

Hi,

Can someone explain to me please why these two queries return different
results:

1. -PaymentType:Finance AND -PaymentType:Lease AND -PaymentType:Cash *(700
results)*

2. (-PaymentType:Finance AND -PaymentType:Lease) AND -PaymentType:Cash *(0
results)*

Logically the two above queries should be return the same results no?

Thank you

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Query-Logic-Question-tp3991689.html
Sent from the Solr - User mailing list archive at Nabble.com.