Custom score script not 'seeing' all items in MultiValueField

Hi,
I created a simple custom_score_script that looks at a MultiValueField
(tags), and if it finds the query (lets say a single word) inside of the
list of tags, it adds ".05" onto the document score.

What I've found is that it is only working on some of the values inside of
the MultiValueField.
For example, if the field contains ['door', 'table', 'ring'], the script
may only increase the score on ring and table... its completely random
object to object.

I have some examples showing whats going on along with the simple custom
score script (python).
http://dpaste.com/1420440/

Any help is much appreciated it... its such a simple script - its killing
me that I can't figure this odd behavior out.

--
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.

Sorry - realized my comments were a bit off. here is the updated
sample: http://dpaste.com/1420446/

On Thursday, October 17, 2013 3:49:15 PM UTC-4, Dave Brown wrote:

Hi,
I created a simple custom_score_script that looks at a MultiValueField
(tags), and if it finds the query (lets say a single word) inside of the
list of tags, it adds ".05" onto the document score.

What I've found is that it is only working on some of the values inside of
the MultiValueField.
For example, if the field contains ['door', 'table', 'ring'], the script
may only increase the score on ring and table... its completely random
object to object.

I have some examples showing whats going on along with the simple custom
score script (python).
http://dpaste.com/1420440/

Any help is much appreciated it... its such a simple script - its killing
me that I can't figure this odd behavior out.

--
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.

Hi Dave,

unless I misunderstood what you were trying to do, I suspect that
there is a problem in your script. Searching for terms in a multi
valued field and scoring accordingly seems to run fine using a mvel
script like here: function score example that checks for words in a multi valued field and adds 1 if the word was found. · GitHub.

Could you provide a full running example (including imports, mapping,
data init, function definitions and so forth) that reproduces the
behavior?

Cheers,
Britta

On Thu, Oct 17, 2013 at 9:52 PM, Dave Brown dave@custommade.com wrote:

Sorry - realized my comments were a bit off. here is the updated sample:
http://dpaste.com/1420446/

On Thursday, October 17, 2013 3:49:15 PM UTC-4, Dave Brown wrote:

Hi,
I created a simple custom_score_script that looks at a MultiValueField
(tags), and if it finds the query (lets say a single word) inside of the
list of tags, it adds ".05" onto the document score.

What I've found is that it is only working on some of the values inside of
the MultiValueField.
For example, if the field contains ['door', 'table', 'ring'], the script
may only increase the score on ring and table... its completely random
object to object.

I have some examples showing whats going on along with the simple custom
score script (python).
http://dpaste.com/1420440/

Any help is much appreciated it... its such a simple script - its killing
me that I can't figure this odd behavior out.

--
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.

--
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.