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?
On Monday, June 25, 2012 1:39:10 PM UTC-4, balazs wrote:
> 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?
On Mon, Jun 25, 2012 at 8:39 PM, balazs <bal...@czifra.net> wrote:
> 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?
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?
On Monday, June 25, 2012 1:59:53 PM UTC-4, Oren Eini wrote:
> AND and OR are case sensitive keywords
> On Mon, Jun 25, 2012 at 8:39 PM, balazs <bal...@czifra.net> wrote:
>> 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?
On Mon, Jun 25, 2012 at 9:05 PM, balazs <bal...@czifra.net> wrote:
> 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?
> On Monday, June 25, 2012 1:59:53 PM UTC-4, Oren Eini wrote:
>> AND and OR are case sensitive keywords
>> On Mon, Jun 25, 2012 at 8:39 PM, balazs <bal...@czifra.net> wrote:
>>> 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?
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?
On Monday, June 25, 2012 2:15:58 PM UTC-4, Oren Eini wrote:
> 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.
> On Mon, Jun 25, 2012 at 9:05 PM, balazs <bal...@czifra.net> wrote:
>> 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?
>> On Monday, June 25, 2012 1:59:53 PM UTC-4, Oren Eini wrote:
>>> AND and OR are case sensitive keywords
>>> On Mon, Jun 25, 2012 at 8:39 PM, balazs <bal...@czifra.net> wrote:
>>>> 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?
On Mon, Jun 25, 2012 at 9:22 PM, balazs <bal...@czifra.net> wrote:
> 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?
> On Monday, June 25, 2012 2:15:58 PM UTC-4, Oren Eini wrote:
>> 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.
>> On Mon, Jun 25, 2012 at 9:05 PM, balazs <bal...@czifra.net> wrote:
>>> 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?
>>> On Monday, June 25, 2012 1:59:53 PM UTC-4, Oren Eini wrote:
>>>> AND and OR are case sensitive keywords
>>>> On Mon, Jun 25, 2012 at 8:39 PM, balazs <bal...@czifra.net> wrote:
>>>>> How do I handle boolean operators in the querystring? For example:
>>>>> CaseHTMLIndex?query=CaseHtml:\****[x%20AND%20y\]&start=0&**pageSiz**e=10
>>>>> and CaseHTMLIndex?query=**CaseHt**ml:\[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=**CaseHt**ml:\[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?
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)
>> 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?
>> On Monday, June 25, 2012 2:15:58 PM UTC-4, Oren Eini wrote:
>>> 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.
>>> On Mon, Jun 25, 2012 at 9:05 PM, balazs <bal...@czifra.net> wrote:
>>>> 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?
>>>> On Monday, June 25, 2012 1:59:53 PM UTC-4, Oren Eini wrote:
>>>>> AND and OR are case sensitive keywords
>>>>> On Mon, Jun 25, 2012 at 8:39 PM, balazs <bal...@czifra.net> wrote:
>>>>>> How do I handle boolean operators in the querystring? For example: >>>>>> CaseHTMLIndex?query=CaseHtml:\****[x%20AND%20y\]&start=0&**pageSiz**e=10 >>>>>> and CaseHTMLIndex?query=**CaseHt**ml:\[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=**CaseHt**ml:\[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?
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)
On Monday, June 25, 2012 2:36:57 PM UTC-4, balazs wrote:
> 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?
> On Monday, June 25, 2012 2:27:59 PM UTC-4, Oren Eini wrote:
>> 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 ()
>> On Mon, Jun 25, 2012 at 9:22 PM, balazs <bal...@czifra.net> wrote:
>>> 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?
>>> On Monday, June 25, 2012 2:15:58 PM UTC-4, Oren Eini wrote:
>>>> 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.
>>>> On Mon, Jun 25, 2012 at 9:05 PM, balazs <bal...@czifra.net> wrote:
>>>>> 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?
>>>>> On Monday, June 25, 2012 1:59:53 PM UTC-4, Oren Eini wrote:
>>>>>> AND and OR are case sensitive keywords
>>>>>> On Mon, Jun 25, 2012 at 8:39 PM, balazs <bal...@czifra.net> wrote:
>>>>>>> How do I handle boolean operators in the querystring? For example: >>>>>>> CaseHTMLIndex?query=CaseHtml:\****[x%20AND%20y\]&start=0&**pageSiz**e=10 >>>>>>> and CaseHTMLIndex?query=**CaseHt**ml:\[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=**CaseHt**ml:\[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?
On Mon, Jun 25, 2012 at 9:36 PM, balazs <bal...@czifra.net> wrote:
> 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?
> On Monday, June 25, 2012 2:27:59 PM UTC-4, Oren Eini wrote:
>> 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 ()
>> On Mon, Jun 25, 2012 at 9:22 PM, balazs <bal...@czifra.net> wrote:
>>> 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?
>>> On Monday, June 25, 2012 2:15:58 PM UTC-4, Oren Eini wrote:
>>>> 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.
>>>> On Mon, Jun 25, 2012 at 9:05 PM, balazs <bal...@czifra.net> wrote:
>>>>> 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?
>>>>> On Monday, June 25, 2012 1:59:53 PM UTC-4, Oren Eini wrote:
>>>>>> AND and OR are case sensitive keywords
>>>>>> On Mon, Jun 25, 2012 at 8:39 PM, balazs <bal...@czifra.net> wrote:
>>>>>>> How do I handle boolean operators in the querystring? For example:
>>>>>>> CaseHTMLIndex?query=CaseHtml:\******[x%20AND%20y\]&start=0&**pageSiz
>>>>>>> ****e=10 and CaseHTMLIndex?query=**CaseHt****ml:\[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=**CaseHt****ml:\[x&&y\]&start=0&**
>>>>>>> pageSize=**1**0 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?