Re: custom_score and javascript

  "script": "(doc['my_type'].value == 'Contact') ? 2 : 1;"

Try replacing your ' with \u0027

clint

Thats because you escape in curl the request with '. You should not see that if you call it from the lang of your choice).

On Friday, July 8, 2011 at 3:02 AM, Thomas Witt wrote:

On 7 Jul., 17:47, Clinton Gormley <clin...@iannounce.co.uk (http://iannounce.co.uk)> wrote:

"script": "(doc['my_type'].value == 'Contact') ? 2 : 1;"

Try replacing your ' with \u0027

Oops - that worked. How come? Is that documented anywhere? Why is
that?

Thanks for the help anyway!

.. Thomas