Sorting equal scores by field length?

Is it possible to sort equally-scored results by the length of the field?

Or am I doing something else incorrectly?

With an edge_ngram filter on a keyword field, with search term S, I see
SUPER comes before S in my results.

As a last resort, I could add a field to reflect the length of the keyword
field, or even turn on dynamic scripting, but I imagine i am missing
something vital....

Thanks
Lee

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3de35adb-4573-4322-b2c0-c1e49320102d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello Lee ,

There is a workaround for that.
You need to enabled word count and then use that in the script.

Word count -

Script in scoring -

HTH.

Thanks
Vineeth

On Thu, Oct 2, 2014 at 4:33 AM, Lee Gee leegee@gmail.com wrote:

Is it possible to sort equally-scored results by the length of the field?

Or am I doing something else incorrectly?

With an edge_ngram filter on a keyword field, with search term S, I see
SUPER comes before S in my results.

As a last resort, I could add a field to reflect the length of the keyword
field, or even turn on dynamic scripting, but I imagine i am missing
something vital....

Thanks
Lee

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/3de35adb-4573-4322-b2c0-c1e49320102d%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/3de35adb-4573-4322-b2c0-c1e49320102d%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nRGQ%3D6BF5HTdnMQ3hM8K7D%2BE-6C0BNzEScm81w8-uTkw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thank you, Vineeth!

On Thursday, October 2, 2014 2:41:42 PM UTC+1, vineeth mohan wrote:

Hello Lee ,

There is a workaround for that.
You need to enabled word count and then use that in the script.

Word count -
Elasticsearch Platform — Find real-time answers at scale | Elastic
Script in scoring -
Elasticsearch Platform — Find real-time answers at scale | Elastic

HTH.

Thanks
Vineeth

On Thu, Oct 2, 2014 at 4:33 AM, Lee Gee <lee...@gmail.com <javascript:>>
wrote:

Is it possible to sort equally-scored results by the length of the field?

Or am I doing something else incorrectly?

With an edge_ngram filter on a keyword field, with search term S, I see
SUPER comes before S in my results.

As a last resort, I could add a field to reflect the length of the
keyword field, or even turn on dynamic scripting, but I imagine i am
missing something vital....

Thanks
Lee

--
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/3de35adb-4573-4322-b2c0-c1e49320102d%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/3de35adb-4573-4322-b2c0-c1e49320102d%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ff650736-935f-44dc-8a3b-7254cd1a5e4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.