elasticsearch


is there a way to boost matches in long documents in elasticsearch


In elasticsearch the length of the document matters a lot to the final score of the search results. So if I have a match in a field that is just one line long, its going to score much higher than a single match in say .... a document with 5 pages of text.
Is there a way to override this behavior, or reliably and repeatedly boost the result to overcome this behavior?
I guess you mean that the length of the matching field is taken into account when computing the score. If you want to just disable this behaviour you can omit norms while indexing. That way you would lose index time boosting as well, but I guess you're not using it and even if you need boosting you should use query time boosting, way more flexible.
You have to update the mapping for your field like this:
"field_name" : {
"type" : "string",
"omit_norms" : true
}
If you want to override this default behaviour for all your string fields you can use a dynamic template like this:
{
"type_name" : {
"dynamic_templates" : [
{
"omit_norms_template" : {
"match_mapping_type" : "string",
"mapping" : {
"omit_norms" : true
}
}
}
]
}
}

Related Links

Elasticsearch: find listings within specific distance from polygon
Why didn't the minimum_should_match parameter remove these spurious results?
How can I create Nest ElasticSearch client with default index and custom analyzer?
In Elasticsearch where to generate keystore and add authentication in readonlyrest plugin?
Kibana unexpectedly changed timeFieldName
Spring Data ElasticSearch - cannot connect to node
How to reverse search given a new document in the query in elasticsearch?
ElasticSearch Failed to create index
difference between field and term query or match query
Cluster Block Exception on Elasticsearch
Elasticsearch query for sum of part of a document
how does the logstash kv{} feature work?
Logstash ruby filter conditional statement error
How to change index field as not analyzed in elastic search while writing a dataframe?
What is the theory behind, Elasticsearch indexing the unstructured data like pdf files?
What database can be used with ElasticSearch [closed]

Categories

HOME
qt
elasticsearch
memory
azure-functions
cucumber
eclipse-plugin
nsview
openlayers-3
tcp
elisp
tup
anchor
log4j2
azure-graph-api
feature-extraction
dhcp
pywinauto
cpu-usage
bazaar
yii2-basic-app
bosun
conda
web-push
offline-caching
marquee
history.js
tortoisehg
acrobat
code-climate
spring-annotations
openbr
rust-cargo
android-collapsingtoolbar
payeezy
gnu-classpath
adminer
cmis
jfxtras
keyboard-layout
bluemixtools
cloudera-quickstart-vm
vungle-ads
vesta
docker-ucp
jenkins-slave
non-linear-regression
entropy
nslayoutconstraint
deedle
.when
zend-server
petsc
oracle-fusion-apps
haraka
rational-performance-test
yii2-model
jeasyui
android-async-http
flush
servicestack-bsd
in-app-billing
smart-tv
dnx50
auto-generate
postal-code
shoes
maven-shade-plugin
symja
qt5.4
forceclose
thruway
tabletools
hotswap
strdup
smips
colon
application-server
san
rautomation
sql-view
jquery-lazyload
arel
jquery-cycle
thejit
struts2-s2hibernate
wcf-callbacks
microblogging
qtextbrowser
datacontracts
radscheduler
qt-mobility
tablet-pc
libxslt
urchin
source-code-protection
inversion
autobench
jboss-mdb

Resources

Encrypt Message