Hello Ivan

thank you very much for your suggestion. I will try this!

Kind regards

Am Montag, 10. November 2014 19:13:43 UTC+1 schrieb Ivan Brusic:
>
> Off the top of my head, the easiest option would be to use a constant 
> score query. Wrap the original query and provide a boost to documents that 
> satisfy your exist filter. 
>
> Cheers,
>
> Ivan
>
> On Mon, Nov 10, 2014 at 12:54 PM, Volker <s...@klest.de <javascript:>> 
> wrote:
>
>> I would like to know whether there is an exists query in ES.
>>
>> I know that there is an exists filter, but I would like to have an exists 
>> query. So documents, where a field exists, should be rated higher than the 
>> ones, where the field does not exists. But if there is no document in that 
>> query, where the field exists, it should still return the other documents. 
>> This would not work with the exists filter, as far as I know. 
>>
>> I know, that I could index an additional field, with the value (e.g.) 
>> true, when the field exists. But I would rather not have this additional 
>> data in the index.
>>
>> So, what is the best solution for this use case?
>>
>> thanks in advance!
>>
>>  -- 
>> 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 elasticsearc...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elasticsearch/e82e64a1-53d7-4067-9a91-ce77fda8c85f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/elasticsearch/e82e64a1-53d7-4067-9a91-ce77fda8c85f%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/8b5a31b0-b3ee-4b82-991d-d85436793327%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to