Sort script worked in 0.2 but does not in 0.9

The following sort script used to work in 0.2 but now fails in 0.9:

{
"_script": {
"script": "org.elasticsearch.common.Digest.md5Hex(doc['myId'].value +
12345)",
"type": "string",
"order": "asc"
}
}

The error I am receiving is:

PropertyAccessException[[Error: unresolvable property or identifier: org]

I cannot figure out the correct words to use in order to google possible
solutions to this problem. Any ideas to point me in the right direction
would be much appreciated.

--
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,
the problem is that the class you're referring to in your script has been
deleted in 0.90. Here is the relevant
commit: cleanup · elastic/elasticsearch@4e66658 · GitHub
.

May I ask what you're trying to achieve with your script? I wonder if what
you're doing is perhaps now possible without scripting.

Cheers
Luca

On Friday, August 30, 2013 10:19:24 PM UTC+2, Nicholas Larsen wrote:

The following sort script used to work in 0.2 but now fails in 0.9:

{
"_script": {
"script": "org.elasticsearch.common.Digest.md5Hex(doc['myId'].value +
12345)",
"type": "string",
"order": "asc"
}
}

The error I am receiving is:

PropertyAccessException[[Error: unresolvable property or identifier: org]

I cannot figure out the correct words to use in order to google possible
solutions to this problem. Any ideas to point me in the right direction
would be much appreciated.

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

I've seem something like that script before on stackoverflow (

) The point is to have a randomlike sorting, but one that you can replicate
(so you can page through the results in a meaningful way).

An alternative (from the same answer on SO) would be to use:

"script" : "(doc['_id'].value + 12345).hashCode()"

regards,

        --harmen

On Friday, September 6, 2013 5:38:53 PM UTC+2, Luca Cavanna wrote:

Hi,
the problem is that the class you're referring to in your script has been
deleted in 0.90. Here is the relevant commit:
cleanup · elastic/elasticsearch@4e66658 · GitHub.

May I ask what you're trying to achieve with your script? I wonder if what
you're doing is perhaps now possible without scripting.

Cheers
Luca

On Friday, August 30, 2013 10:19:24 PM UTC+2, Nicholas Larsen wrote:

The following sort script used to work in 0.2 but now fails in 0.9:

{
"_script": {
"script": "org.elasticsearch.common.Digest.md5Hex(doc['myId'].value

  • 12345)",
    "type": "string",
    "order": "asc"
    }
    }

The error I am receiving is:

PropertyAccessException[[Error: unresolvable property or identifier: org]

I cannot figure out the correct words to use in order to google possible
solutions to this problem. Any ideas to point me in the right direction
would be much appreciated.

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

Thanks for looking at this question, but this also does not work in 0.90
without a plugin.

On Monday, September 9, 2013 3:15:36 AM UTC-4, h.b.wa...@alumnus.rug.nl
wrote:

I've seem something like that script before on stackoverflow (
Random order & pagination Elasticsearch - Stack Overflow) The point is to have a randomlike sorting, but one that you can replicate
(so you can page through the results in a meaningful way).

An alternative (from the same answer on SO) would be to use:

"script" : "(doc['_id'].value + 12345).hashCode()"

regards,

        --harmen

On Friday, September 6, 2013 5:38:53 PM UTC+2, Luca Cavanna wrote:

Hi,
the problem is that the class you're referring to in your script has been
deleted in 0.90. Here is the relevant commit:
cleanup · elastic/elasticsearch@4e66658 · GitHub.

May I ask what you're trying to achieve with your script? I wonder if
what you're doing is perhaps now possible without scripting.

Cheers
Luca

On Friday, August 30, 2013 10:19:24 PM UTC+2, Nicholas Larsen wrote:

The following sort script used to work in 0.2 but now fails in 0.9:

{
"_script": {
"script": "org.elasticsearch.common.Digest.md5Hex(doc['myId'].value

  • 12345)",
    "type": "string",
    "order": "asc"
    }
    }

The error I am receiving is:

PropertyAccessException[[Error: unresolvable property or identifier: org
]

I cannot figure out the correct words to use in order to google possible
solutions to this problem. Any ideas to point me in the right direction
would be much appreciated.

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

This is what I was looking for, thank you. And for anyone who runs into
this problem later, the discussion moved to stack overflowhttp://stackoverflow.com/questions/18541354/elastic-search-sort-script-not-working-after-upgrade
.

On Friday, September 6, 2013 11:38:53 AM UTC-4, Luca Cavanna wrote:

Hi,
the problem is that the class you're referring to in your script has been
deleted in 0.90. Here is the relevant commit:
cleanup · elastic/elasticsearch@4e66658 · GitHub.

May I ask what you're trying to achieve with your script? I wonder if what
you're doing is perhaps now possible without scripting.

Cheers
Luca

On Friday, August 30, 2013 10:19:24 PM UTC+2, Nicholas Larsen wrote:

The following sort script used to work in 0.2 but now fails in 0.9:

{
"_script": {
"script": "org.elasticsearch.common.Digest.md5Hex(doc['myId'].value

  • 12345)",
    "type": "string",
    "order": "asc"
    }
    }

The error I am receiving is:

PropertyAccessException[[Error: unresolvable property or identifier: org]

I cannot figure out the correct words to use in order to google possible
solutions to this problem. Any ideas to point me in the right direction
would be much appreciated.

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