Fields boost


(Alexander Ott) #1

Hello,

we are trying to use boost on field level at index time. Therefore we have
a mapping for e.g. as followed:

{
"object": {
"key": "1234",
"creation_date": "2014-01-01",
"title": [
{
"maintitle": {
"_boost": "5.0",
"title": "Maintitle"
}
},
{
"subtitle": {
"_boost": "3.0",
"title": "Subtitle"
}
}
]
}
}

Is it correct to name the 'boost' field '_boost' or must we name it
'boost'? What is the right convention?

In our query we want to search in '_all' field and ensure that the boost of
our fields take effect.
So will it take effect if we only add the '_all' field to the query or do
we have to all the fields with a boost value, too

for e.g.
"query" : {
"query_string" : {
"query" : "title",
"fields": ["_all"]
}
}

or like

"query" : {
"query_string" : {
"query" : "title",
"fields": ["_all", "object.title.maintitle",
"object.title.subtitle"]
}
}

Greetings,
Alex

--
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/aaf76d0d-6775-4879-b68c-cad216fc43bc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Jörg Prante) #2

You can use boost or _boost, it does not matter.
The declaration of "fields" in a query has no impact since the boosting is
applied at indexing time (static boosting). Note, there is also dynamic
boosting at query time, for boosting query terms.

Jörg

--
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/CAKdsXoFkKOotpsqPP%2BH4MpZ_qJHF7ZOO7giHGu2p%2BhECFi4ADA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3