I tried the following query

{
  "fields": [
    "score",
    "title",
    "price"
  ],
  "boosting": {
    "positive": {
      "term": {
        "text": "einzelhandel"
      }
    },
    "negative": {
      "term": {
        "price": "100"
      }
    },
    "negative_boost": 0.0025,
    "boost": 200
  }
}


What I'm trying to do is to search for "einzelhandel" with a boost of 200 
(e.g. "text:einzelhandel^200")
and have hits which also match a price of 100 get boosted with 400 (e.g. 
"price:100^400") to have them before all other prices.
But this doen't work, any better ideas?

Also, the fields in the result are not limited to "score,title,price". 
Is this not possible with boosting query?

Regards,
Bernd

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/b81716ca-6c07-493e-9645-36bc21fce798%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to