Hi All,
I am facing an issue in exact wild-card searching on analyzed field.
I have below values of field1.
aj+bk
aj+mg
rr+nr
Now if i search for aj+bk then i am getting only one record that is *aj+bk
.
And if i search using wild card character for example j+bk then i am
getting 2 records that is aj+bk ,aj+mg ; But expected records in second
search is 1 instead of returning 2 records .
According to my observation, during wild card search, query string is
behaving like OR query and returning all the records which has at-least
one token match even I have mentioned AND operator in query.
My query is :
"{"query" : "+ QueryBuilders.queryString("field1"+ "+" +
input).analyzeWildcard(true).defaultOperator(Operator.AND).toString() + "}";
why AND searching is not working in case of leading wildcard search.
--
Thanks & Regards
Hanish Bansal
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
jpountz
(Adrien Grand)
September 23, 2013, 4:41pm
2
Hi,
Is the '+' contained in your terms supposed to be an URL-encoded space or
is it an actual 'plus'? Can you provide us with a full curl recreation for
this issue?
Thanks.
--
Adrien Grand
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
It is actual 'plus' i.e + .
I am using java api to fire query. My final query becomes :
{
"filtered" : {
"query" : {
"match_all" : { }
},
"filter" : {
"wrapper" : {
"filter" : {"and":[{"query" : {
"query_string" : {
"query" : "field1:*j+bk",
"default_operator" : "and"
}
}}]}
}
}
}
On Mon, Sep 23, 2013 at 10:11 PM, Adrien Grand <
adrien.grand@elasticsearch.com > wrote:
Hi,
Is the '+' contained in your terms supposed to be an URL-encoded space or
is it an actual 'plus'? Can you provide us with a full curl recreation for
this issue?
Thanks.
--
Adrien Grand
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
Thanks & Regards
Hanish Bansal
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
jpountz
(Adrien Grand)
September 24, 2013, 8:34am
4
Hi,
What analyzer are you using? Can you paste your mapping definition?
On Tue, Sep 24, 2013 at 8:45 AM, Hanish Bansal <
hanish.bansal.agarwal@gmail.com > wrote:
It is actual 'plus' i.e + .
I am using java api to fire query. My final query becomes :
{
"filtered" : {
"query" : {
"match_all" : { }
},
"filter" : {
"wrapper" : {
"filter" : {"and":[{"query" : {
"query_string" : {
"query" : "field1:*j+bk",
"default_operator" : "and"
}
}}]}
}
}
}
On Mon, Sep 23, 2013 at 10:11 PM, Adrien Grand <
adrien.grand@elasticsearch.com > wrote:
Hi,
Is the '+' contained in your terms supposed to be an URL-encoded space or
is it an actual 'plus'? Can you provide us with a full curl recreation for
this issue?
Thanks.
--
Adrien Grand
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
Thanks & Regards
Hanish Bansal
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
Adrien Grand
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
we are using default standard analyzer for field field1.
Index mapping is:
{
"tweetindex1":
{
"tweet_ipdr":
{
"_source":
{
"enabled": false
},
"properties":
{
"field1":
{
"type": "string",
"store": true
},
"field2":
{
"type": "string",
"store": true
}
}
}
}
}
On Tue, Sep 24, 2013 at 2:04 PM, Adrien Grand <
adrien.grand@elasticsearch.com > wrote:
Hi,
What analyzer are you using? Can you paste your mapping definition?
On Tue, Sep 24, 2013 at 8:45 AM, Hanish Bansal <
hanish.bansal.agarwal@gmail.com > wrote:
It is actual 'plus' i.e + .
I am using java api to fire query. My final query becomes :
{
"filtered" : {
"query" : {
"match_all" : { }
},
"filter" : {
"wrapper" : {
"filter" : {"and":[{"query" : {
"query_string" : {
"query" : "field1:*j+bk",
"default_operator" : "and"
}
}}]}
}
}
}
On Mon, Sep 23, 2013 at 10:11 PM, Adrien Grand <
adrien.grand@elasticsearch.com > wrote:
Hi,
Is the '+' contained in your terms supposed to be an URL-encoded space
or is it an actual 'plus'? Can you provide us with a full curl recreation
for this issue?
Thanks.
--
Adrien Grand
--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
Thanks & Regards
Hanish Bansal
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
Adrien Grand
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
Thanks & Regards
Hanish Bansal
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .