Problem boost when search using all field


(Gustavo Maia) #1

I am having trouble using the search field _all. The search field appears
that all is not using the boost set in each field.
The following example from my bottom configuration and searches.

{
"topicoindex" : {
"topicoindexmap" : {
"_boost" : {
"null_value" : 1.0,
"name" : "doc_boost"
},
"_source" : {
"enabled" : false
},
"properties" : {
"id" : {
"store" : "yes",
"type" : "long"
},
"topico" : {
"index" : "no",
"store" : "yes",
"type" : "string"
},
"titulo" : {
"index" : "no",
"store" : "yes",
"boost" : 2.0,
"type" : "string"
},
"tipo" : {
"store" : "yes",
"type" : "integer"
},
"primeiro_term" : {
"store" : "yes",
"boost" : 1000.0,
"type" : "string"
},
}
}
}
}

Example search 1: use 2 fields (titulo boost(2.0f) and primeiro_term
boost(1000.0))

{
"from" : 0,
"size" : 200,
"query" : {
"query_string" : {
"query" : "Habeas",
"fields" : [ "titulo", "primeiro_term" ],
"default_operator" : "and",
"enable_position_increments" : false
}
},
"fields" : [ "topico", "primeiro_term"]
}

Result List and score:

HABEAS CORPUS | 2540.5815
HABEAS-C0RPUS | 2412.527

Example search 2: use field _ALL

{
"from" : 0,
"size" : 200,
"query" : {
"query_string" : {
"query" : "Habeas",
"fields" : [ "_all" ],
"default_operator" : "and",
"enable_position_increments" : false
}
},
"fields" : [ "topico", "primeiro_term"]
}

Result List and score:

HABEAS CORPUS | 0.67507887
HABEAS-C0RPUS | 0.6746672

--
Gustavo Maia


(system) #2