Hi,
Does the individual boost factor get honoured for fields getting copied
into a custom _all field via copy_to option?
I am facing issues with the behavior. Have a look at the example below
PUT localhost:9200/investigations/TestCustom/_mapping
{
"TestCustom": {
"properties": {
"custom_all":{
"type": "string"
},
"name":{
"type": "string",
"copy_to":"custom_all",
"boost":2.0
},
"surName":{
"type": "string",
"copy_to":"custom_all"
},
"dateRecorded":{
"type": "date",
"copy_to":"custom_all"
},
"Id":{
"type": "long",
"copy_to":"custom_all"
}
}
}
}
Fiels "name" has been given a boost factor of 2.0
I post 2 documents now
POST localhost:9200/investigations/TestCustom/5
{
"surName":"Preeti"
}
POST localhost:9200/investigations/TestCustom/6
{
"name":"Preeti"
}
and then search the custom_all field
GET localhost:9200/investigations/TestCustom/_search
{
"query":{
"query_string": {
"default_field": "custom_all",
"query": "Preeti"
}
}
}
I expected document with id 6 to be the top result but the results were
{
"took": 40,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 1,
"hits": [
{
"_index": "investigations",
"_type": "TestCustom",
"_id": "5",
"_score": 1,
"_source": {
"surName": "Preeti"
}
},
{
"_index": "investigations",
"_type": "TestCustom",
"_id": "6",
"_score": 1,
"_source": {
"name": "Preeti"
}
}
]
}
}
Is this expected behavior?
--
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/79af9adb-5dce-4a7a-897b-16cd962c8a40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.