Hi, I'm trying to execute a rather complicated nested bool query: ((string match and range) OR (string match and range)) AND((string match and range) OR (string match and range)) AND ...
and I see that the range query has a tremendous effect on performance
(~400ms per range).
Been making an effort to run this under nested filter but haven't been able
to build a valid query.
Currently the query looks like this:
{
"size": 0,
"query": {
"bool": {
"must": [
{
"nested": {
"path": "obj1",
"query": {
"bool": {
"should": [
{
"bool": {
"must": [
{
"match": {
"var": "example4"
}
},
{
"range": {
"absolutePvs": {
"gte": 1
}
}
}
]
}
},
{
"bool": {
"must": [
{
"match": {
"var": "example3"
}
},
{
"range": {
"absolutePvs": {
"gte": 1
}
}
}
]
}
}
]
}
}
}
},
{
"nested": {
"path": "obj2",
"query": {
"bool": {
"should": [
{
"bool": {
"must": [
{
"match": {
"var": "example1"
}
},
{
"range": {
"absolutePvs": {
"gte": 1
}
}
}
]
}
},
{
"bool": {
"must": [
{
"match": {
"var": "example2"
}
},
{
"range": {
"absolutePvs": {
"gte": 1
}
}
}
]
}
}
]
}
}
}
}
]
}
}
}
currently this query takes ~3 seconds to run. When removing the range
conditions, the query runs
in ~300ms.
Does anyone know how can I improve this???
Thanks in advanced,
Oren
--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Bool-range-query-performance-tp4067694.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1418634566330-4067694.post%40n3.nabble.com.
For more options, visit https://groups.google.com/d/optout.
