Is there a easy way to give a "AND" clause in the _search?q= query string?
Use something like q=+term1 +term2
It should work
HTH
David
Le 30 mai 2012 à 19:08, Mohit Anchlia mohitanchlia@gmail.com a écrit :
Is there a easy way to give a "AND" clause in the _search?q= query string?et
On Wed, May 30, 2012 at 11:11 AM, David Pilato david@pilato.fr wrote:
Use something like q=+term1 +term2
It should workI tried this. I am pretty sure I am doing something wrong here
curl -XGET 'http://dslg1:9200/documents/object/_search?q=+20+EAAgfyaxpzdfcfv9Qexq1WtGvA'
curl: (52) Empty reply from server
My document that I expect to match is something like:
{ "attributes" : [
{ "base64" : true,
"encrypted" : true,
"name" : "EAAgfyaxpzdfcfv9Qexq1WtGvA=="
},
{ "base64" : false,
"encrypted" : false,
"age" : "32"
}
],
"version" : 1337298622093
}
HTH
DavidLe 30 mai 2012 à 19:08, Mohit Anchlia mohitanchlia@gmail.com a écrit :
Is there a easy way to give a "AND" clause in the _search?q= query
string?et
Try to encode URL
Something like %20 instead of space...
%xx (i don't remember it) instead of plus sign.
David
Le 30 mai 2012 à 20:25, Mohit Anchlia mohitanchlia@gmail.com a écrit :
On Wed, May 30, 2012 at 11:11 AM, David Pilato david@pilato.fr wrote:
Use something like q=+term1 +term2
It should workI tried this. I am pretty sure I am doing something wrong here
curl -XGET 'http://dslg1:9200/documents/object/_search?q=+20 +EAAgfyaxpzdfcfv9Qexq1WtGvA'
curl: (52) Empty reply from server
My document that I expect to match is something like:
{ "attributes" : [
{ "base64" : true,
"encrypted" : true,
"name" : "EAAgfyaxpzdfcfv9Qexq1WtGvA=="
},
{ "base64" : false,
"encrypted" : false,
"age" : "32"
}
],
"version" : 1337298622093
}HTH
DavidLe 30 mai 2012 à 19:08, Mohit Anchlia mohitanchlia@gmail.com a écrit :
Is there a easy way to give a "AND" clause in the _search?q= query string?et
Is there a way to explicitly say name:abc AND age:2?
On Wed, May 30, 2012 at 11:53 AM, David Pilato david@pilato.fr wrote:
Try to encode URL
Something like %20 instead of space...
%xx (i don't remember it) instead of plus sign.David
Le 30 mai 2012 à 20:25, Mohit Anchlia mohitanchlia@gmail.com a écrit :
On Wed, May 30, 2012 at 11:11 AM, David Pilato david@pilato.fr wrote:
Use something like q=+term1 +term2
It should workI tried this. I am pretty sure I am doing something wrong here
curl -XGET 'http://dslg1:9200/documents/object/_search?q=+20+EAAgfyaxpzdfcfv9Qexq1WtGvA'
curl: (52) Empty reply from server
My document that I expect to match is something like:
{ "attributes" : [
{ "base64" : true,
"encrypted" : true,
"name" : "EAAgfyaxpzdfcfv9Qexq1WtGvA=="
},
{ "base64" : false,
"encrypted" : false,
"age" : "32"
}
],
"version" : 1337298622093
}HTH
DavidLe 30 mai 2012 à 19:08, Mohit Anchlia mohitanchlia@gmail.com a écrit :
Is there a easy way to give a "AND" clause in the _search?q= query
string?et
I use : +name:abc +age:2
Le 30 mai 2012 à 20:58, Mohit Anchlia mohitanchlia@gmail.com a écrit :
Is there a way to explicitly say name:abc AND age:2?
On Wed, May 30, 2012 at 11:53 AM, David Pilato david@pilato.fr wrote:
Try to encode URLSomething like %20 instead of space...
%xx (i don't remember it) instead of plus sign.David
Le 30 mai 2012 à 20:25, Mohit Anchlia mohitanchlia@gmail.com a écrit :
On Wed, May 30, 2012 at 11:11 AM, David Pilato david@pilato.fr wrote:
Use something like q=+term1 +term2
It should workI tried this. I am pretty sure I am doing something wrong here
curl -XGET 'http://dslg1:9200/documents/object/_search?q=+20 +EAAgfyaxpzdfcfv9Qexq1WtGvA'
curl: (52) Empty reply from server
My document that I expect to match is something like:
{ "attributes" : [
{ "base64" : true,
"encrypted" : true,
"name" : "EAAgfyaxpzdfcfv9Qexq1WtGvA=="
},
{ "base64" : false,
"encrypted" : false,
"age" : "32"
}
],
"version" : 1337298622093
}HTH
DavidLe 30 mai 2012 à 19:08, Mohit Anchlia mohitanchlia@gmail.com a écrit :
Is there a easy way to give a "AND" clause in the _search?q= query string?et