Hello Tim ,

The default similarity already have this logic in it , but then am sure
there are other logics too applied for default similarity.
I am not sure how to use this function logic alone for scoring.

But then , in worst case you can do as follows , but am sure there should
exist and better way for thos.
Create a script in scoring and use the  ( score =
_index['FIELD']['TERM'].tf() > 0  ? 1 : 0 ) and sum all the score for each
term as the score of that document. -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-advanced-scripting.html

Thanks
          vineeth

On Thu, Sep 25, 2014 at 9:19 AM, Tim Uckun <timuc...@gmail.com> wrote:

>
>
> On Tuesday, September 23, 2014 2:18:35 PM UTC+12, Tim Uckun wrote:
>>
>> I have documents with an array field. The array contains unique elements
>> only. In this case the data is strings and but it could be numbers.
>>
>> I want to search for documents using this array field. Ideally I would
>> like to pass in an array and find the "nearest match" meaning documents
>> which contain all or most of the elements in the array I passed in.
>>
>> For example "find me all the documents with the array field similar to
>> ['this', 'that', 'the other thing']"
>>
>>
> Hey guys I hate to bump myself up but does anybody have any hints on how
> this could be done?
>
> --
> 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/0c705855-5684-45c5-902b-e310178f8e1d%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/0c705855-5684-45c5-902b-e310178f8e1d%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/CAGdPd5mgz7hVRC8VjJyhpEm8QLk%3DSJYr96sS-zrQe%2Bqy1UqX%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to