subhash
(subhash)
July 19, 2012, 10:56am
1
Hi,
I have referred below link
http://www.elasticsearch.org/guide/reference/mapping/boost-field.html
Still I have doubt on the same.
Below is my scenario
Index is : employees
{
"settings": {"number_of_shards": 3, "number_of_replica": 0},
"mappings": {
"employee": {
"_source": {"enabled": true},
"properties": {"name": {"type": "string"},"surname": {"type":
"string"},"phone": {"type": "string"}
} } } }
Now please help me how I can apply a boost level on surname .
I was trying below script, but is not working for me
{
"settings": {"number_of_shards": 3, "number_of_replica": 0},
"mappings": {
"employee": {
"_source": {"enabled": true},
"_boost": {"name": "*surname*","null_value": 2},
"properties": {"name": {"type": "string"},"*surname*": {"type":
"string"},"phone": {"type": "string"}
} } } }
Ivan
(Ivan Brusic)
July 20, 2012, 7:14pm
2
The _boost setting is used to indicate which field contains the value
to boost the score of the entire document. This field should be a
numerical value, not a string like surname.
What exactly are you trying to achieve? Are you trying to boost based
on the value the surname? If so, you can boost the field within your
indexing code or boost at query time
(Elasticsearch Platform — Find real-time answers at scale | Elastic ),
--
Ivan
On Thu, Jul 19, 2012 at 3:56 AM, subhash mksubhashnambiar@gmail.com wrote:
Hi,
I have referred below link
Elasticsearch Platform — Find real-time answers at scale | Elastic
Still I have doubt on the same.
Below is my scenario
Index is : employees
{
"settings": {"number_of_shards": 3, "number_of_replica": 0},
"mappings": {
"employee": {
"_source": {"enabled": true},
"properties": {"name": {"type": "string"},"surname": {"type":
"string"},"phone": {"type": "string"}
} } } }
Now please help me how I can apply a boost level on surname.
I was trying below script, but is not working for me
{
"settings": {"number_of_shards": 3, "number_of_replica": 0},
"mappings": {
"employee": {
"_source": {"enabled": true},
"_boost": {"name": "surname","null_value": 2},
"properties": {"name": {"type": "string"},"surname": {"type":
"string"},"phone": {"type": "string"}
} } } }