I'm obviously violating something behind the scenes, but I have this really
awesome query coming together with one hangup.
I'm using a bool, with a query string, a range, and a boosting query.
Fantastic results. HOwever, I need to add a secondary boosting query on a
different field. Multiple term queries work fine, but the second boosted
query throws parsing errors. Is this possible or do I need some creative
workaround?
If I just copy and paste the boosting section with a different field,as you
would with a term query, the query fails. I tried getting creative with an
array and a subquery wrapper, but nothing seems to work. ES head just drops
one.
{
"query": {
"bool": {
"should": {
"boosting": {
"positive": {
"term": {
"demote": "0"
}
},
"negative": {
"term": {
"demote": "1"
}
},
"negative_boost": 1.5
}
}
}
}
}
--
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.
Nevermind, I'm an idiot. I had made my query way too complex. It does work
in the array.
On Tuesday, February 26, 2013 11:08:41 AM UTC-5, jtr...@gmail.com wrote:
I'm obviously violating something behind the scenes, but I have this
really awesome query coming together with one hangup.
I'm using a bool, with a query string, a range, and a boosting query.
Fantastic results. HOwever, I need to add a secondary boosting query on a
different field. Multiple term queries work fine, but the second boosted
query throws parsing errors. Is this possible or do I need some creative
workaround?
If I just copy and paste the boosting section with a different field,as
you would with a term query, the query fails. I tried getting creative with
an array and a subquery wrapper, but nothing seems to work. ES head just
drops one.
{
"query": {
"bool": {
"should": {
"boosting": {
"positive": {
"term": {
"demote": "0"
}
},
"negative": {
"term": {
"demote": "1"
}
},
"negative_boost": 1.5
}
}
}
}
}
--
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.