Hi there,
I´m new to Elasticsearch.
I tried to search over multiple untouched fields with the following query:
{
"from" : searchPageNumberFTS,
"size":10,
"sort":{},
"query":[ {
"filtered" : {
"query" : {
"wildcard" :
{ "Product.untouched":searchTextFulltextSearch}
} ,
"filter": {
"or":[
{
"query": {
"wildcard": {
"Test.untouched": "*"
}
}
}
]
}
},"filtered" : {
"query" : {
"wildcard" :
{ "Project.untouched":searchTextFulltextSearch}
} ,
"filter": {
"or":[
{
"query": {
"wildcard": {
"Test.untouched": "*"
}
}
}
]
}
}
}]
};
But the 1st query was overwritten! It resolves as :
{"from":0,"size":10,"sort":{},"query":[{"filtered":{"query":{
"wildcard":{"Project.untouched":"CRI**1 "}},"filter":{"or":[{"query":{
"wildcard":{"Test.untouched":"*"}}}]}}}]}:
is there any posiblility to search over more the one untouched field ?
Greetings
ND
--
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 .
Ivan
(Ivan Brusic)
November 13, 2013, 8:01pm
2
You need to combine the different queries with a bool query instead of
creating an array of queries:
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
Also, are you sure you want to use a query filter that is essentially a
match all? Not sure what you heop to achieve, but perhaps the exist filter
might be more appropriate:
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
Cheers,
Ivan
On Wed, Nov 13, 2013 at 6:18 AM, Nd Coderific
andreas.coder@googlemail.com wrote:
Hi there,
I´m new to Elasticsearch.
I tried to search over multiple untouched fields with the following query:
{
"from" : searchPageNumberFTS,
"size":10,
"sort":{},
"query":[ {
"filtered" : {
"query" : {
"wildcard" :
{ "Product.untouched":searchTextFulltextSearch}
} ,
"filter": {
"or":[
{
"query": {
"wildcard": {
"Test.untouched": "*"
}
}
}
]
}
},"filtered" : {
"query" : {
"wildcard" :
{ "Project.untouched":searchTextFulltextSearch}
} ,
"filter": {
"or":[
{
"query": {
"wildcard": {
"Test.untouched": "*"
}
}
}
]
}
}
}]
};
But the 1st query was overwritten! It resolves as :
{"from":0,"size":10,"sort":{},"query":[{"filtered":{"query":{
"wildcard":{"Project.untouched":"CRI**1 "}},"filter":{"or":[{"query":{
"wildcard":{"Test.untouched":"*"}}}]}}}]}:
is there any posiblility to search over more the one untouched field ?
Greetings
ND
--
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 .
--
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 .