Have you tried boosting boolean query clauses?

http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_boosting_query_clauses.html

Jörg


On Fri, Aug 1, 2014 at 2:39 PM, Bernd Fehling <bernd.fehl...@gmail.com>
wrote:

> 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
> <https://groups.google.com/d/msgid/elasticsearch/b81716ca-6c07-493e-9645-36bc21fce798%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAKdsXoHmbtRa_JgD0DuyS-KnjP0RFwgyCE%2BpSUZqLd8Vyx54%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to