Boosting a document value

Tested now in an older version of Elasticsearch (0.19.0 - 2012-03-01) and
the example works there. Is there some reason why this doesn't work in the
newer releases?

Den onsdagen den 20:e februari 2013 kl. 20:45:50 UTC+1 skrev markusos:

I just copy the script and paste it in the terminal, have not changed
anything in it. I get the error on all curl -XPOST
localhost:9200/p/profile -d '{

"skills": [ { "_value": "ruby", "_boost": 5 } ]

}' where _boost != 1. I'm using the latest stable release (0.20.5 -
2013-02-14).

Den onsdagen den 20:e februari 2013 kl. 18:33:47 UTC+1 skrev Jade
Dominguez:

did you change the field mappings? index time boosts are stored in the
norms so you cannot set omit_norms: false
On Feb 20, 2013 8:18 AM, "markusos" markus....@gmail.com wrote:

Hi Jade!

Your example (https://gist.github.**com/plusjade/4988626https://gist.github.com/plusjade/4988626) is
close to what I'm trying to do, but when I run it i get an error:

$ curl -XPOST localhost:9200/p/profile -d '{
"skills": [ { "_value": "ruby", "_boost": 5 } ]
}'
{"error":"UnsupportedOperationException[You cannot set an index-time
boost: norms are omitted for field 'skills']","status":500}

Am I missing something?

Den tisdagen den 19:e februari 2013 kl. 19:41:12 UTC+1 skrev Jade
Dominguez:

Noam, only _boost, and boost are valid boost attribute keys. You cannot
use an arbitrarily named value for boosting. The mapping you've shown is
actually mapping an object with properties "value" and "my_boost". You want
to be mapping a string type with the value of "value" and the internal
boost of _boost:

{
"message" : {
"_value": "boosted value",
"_boost": 2.0
}
}

Reference: http://www.Elasticsearch Platform — Find real-time answers at scale | Elastic
reference/mapping/core-types.**htmlhttp://www.elasticsearch.org/guide/reference/mapping/core-types.html(under type String)

I have made a control-test example to highlight boosting by individual
keyword value: https://gist.github.**com/plusjade/4988626https://gist.github.com/plusjade/4988626

Please verify you can run this and get back the expected results. Any
further questions should build off this control test so that we are in
complete alignment.

On Monday, February 18, 2013 11:20:59 PM UTC-8, Noam Guy wrote:

Hi Jade,

First of all thanks for the reply.

This is how the mapping should look like:

{
"image" : {

    "properties" : {
        "lists" : {

            "properties" : {

                "value" : {"type" : "string"}, 

                "my_boost" : {"type" : "string"}

            }
        }

    }
}

}

The problem (as I can see :slight_smile: ) from your solution is that it does not
use the dynamic boost (my_boost) I store when indexing the document.

Am I missing something?

Noam.

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