Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
boolean operators in querystring
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
balazs  
View profile   Translate to Translated (View Original)
 More options Jun 25 2012, 1:39 pm
From: balazs <bal...@czifra.net>
Date: Mon, 25 Jun 2012 10:39:10 -0700 (PDT)
Local: Mon, Jun 25 2012 1:39 pm
Subject: boolean operators in querystring

How do I handle boolean operators in the querystring?  For example:
CaseHTMLIndex?query=CaseHtml:\[x%20AND%20y\]&start=0&pageSize=10
and CaseHTMLIndex?query=CaseHtml:\[xANDy\]&start=0&pageSize=10 both come
back with no results,
but:
CaseHTMLIndex?query=CaseHtml:\[x%20&&%20y\]&start=0&pageSize=10
and CaseHTMLIndex?query=CaseHtml:\[x&&y\]&start=0&pageSize=10 both do have
results.  However, I'm not sure if those results are the result of
correctly processing the boolean condition.

So, do AND and OR not work in the querystring, and should I rely on && and
|| instead?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
balazs  
View profile   Translate to Translated (View Original)
 More options Jun 25 2012, 1:53 pm
From: balazs <bal...@czifra.net>
Date: Mon, 25 Jun 2012 10:53:41 -0700 (PDT)
Local: Mon, Jun 25 2012 1:53 pm
Subject: Re: boolean operators in querystring

It seems that while && and || do return results, they are incorrect.  So,
how do I issue a boolean query using the HTTP API?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile   Translate to Translated (View Original)
 More options Jun 25 2012, 1:59 pm
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Mon, 25 Jun 2012 20:59:53 +0300
Local: Mon, Jun 25 2012 1:59 pm
Subject: Re: [RavenDB] boolean operators in querystring

AND and OR are case sensitive keywords


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
balazs  
View profile   Translate to Translated (View Original)
 More options Jun 25 2012, 2:05 pm
From: balazs <bal...@czifra.net>
Date: Mon, 25 Jun 2012 11:05:47 -0700 (PDT)
Local: Mon, Jun 25 2012 2:05 pm
Subject: Re: [RavenDB] boolean operators in querystring

I realize that.  I am trying to search for all documents within the
CaseHtml field that contain x and also contain y.  I was under the
impression that translated to CaseHtml:[x AND y] or  CaseHtml:[x && y] both
of which should work according to the Lucene documentation.  Is there some
reason these are incorrect?  Also, how should these be encoded in the URL?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options Jun 25 2012, 2:15 pm
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Mon, 25 Jun 2012 21:15:58 +0300
Local: Mon, Jun 25 2012 2:15 pm
Subject: Re: [RavenDB] boolean operators in querystring

No, it does NOT work like that
What you are trying is not a supported syntax.

You want:

CaseHtml:x AND CaseHtml:y

Assuming that CaseHtml is an analyzed field.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
balazs  
View profile   Translate to Translated (View Original)
 More options Jun 25 2012, 2:22 pm
From: balazs <bal...@czifra.net>
Date: Mon, 25 Jun 2012 11:22:40 -0700 (PDT)
Local: Mon, Jun 25 2012 2:22 pm
Subject: Re: [RavenDB] boolean operators in querystring

Ah, I didn't realize that.  The RavenDB website says "You can pass any
valid Lucene query...", and FieldName[conditions] is a valid Lucene query
per Lucene's site:  http://lucene.apache.org/core/old_versioned_docs/versions/3_0_0/query...
Grouping .

So does this mean that if I want to issue a query for 10 different terms in
a particular field, I need to parse it out into ten separate
Field:condition statements?  That would be painful.

Also, is the field grouping supported by Advanced.LuceneQuery() using the
client API or do I need to split out each condition there as well?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile   Translate to Translated (View Original)
 More options Jun 25 2012, 2:27 pm
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Mon, 25 Jun 2012 21:27:59 +0300
Local: Mon, Jun 25 2012 2:27 pm
Subject: Re: [RavenDB] boolean operators in querystring

No, it is NOT a valid query.

CaseHtml:(x OR y)

Would probably work, what you had was:

CaseHtml:[x OR y]

Note that [] vs ()


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
balazs  
View profile  
 More options Jun 25 2012, 2:36 pm
From: balazs <bal...@czifra.net>
Date: Mon, 25 Jun 2012 11:36:57 -0700 (PDT)
Local: Mon, Jun 25 2012 2:36 pm
Subject: Re: [RavenDB] boolean operators in querystring

Ah, yes, that's true.  Sorry, that way a typo on my part.  Do you have any
idea why I get the following results:
* ?query=FieldName:\(x%20AND %20 y\) = no results (should be 3)
*  ?query=FieldName:\(x%20&&%20y\) = 9 results (should be 3)
*  ?query=FieldName:\(x%20||%20y\) = 9 results (correct)
*  ?query=FieldName:\(x%20OR%20y\) = 9 results (correct)

Is this some sort of encoding issue?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
balazs  
View profile   Translate to Translated (View Original)
 More options Jun 25 2012, 3:24 pm
From: balazs <bal...@czifra.net>
Date: Mon, 25 Jun 2012 12:24:27 -0700 (PDT)
Local: Mon, Jun 25 2012 3:24 pm
Subject: Re: [RavenDB] boolean operators in querystring

Alright, this was a silly issue: the problem was the leading \ before the (
and ) characters.  So, a correct version of the querystring should look
like this:
?query=FieldName:(x%20AND%20y)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Itamar Syn-Hershko  
View profile   Translate to Translated (View Original)
 More options Jun 25 2012, 2:57 pm
From: Itamar Syn-Hershko <ita...@hibernatingrhinos.com>
Date: Mon, 25 Jun 2012 21:57:49 +0300
Local: Mon, Jun 25 2012 2:57 pm
Subject: Re: [RavenDB] boolean operators in querystring

As Oren said, the && and || operators are meaningless here

Don't escape the parenthesis.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »