I am playing with indexing an articlenumber in Elasticsearch.
Here i provide a working example: https://found.no/play/gist/557202b3542be157d813
i dont understand why i get a different score if i change the value for "product_number.search"
if i change the value from "ak454" to "ak 454" the score changes.
i thought that if i am using a search_analyzer the value "ak 454" will be transformed to "ak454" (its mapped using the searchable_id).
you can also look at the analyses tab to see my tokenizer: https://found.no/play/gist/557202b3542be157d813#analysis
thanks.
The term
-query (and filter) does not do any text analysis.
The match
-query does, and can achieve what you want.
I adapted the example: https://found.no/play/gist/2de967d844c5fbc14d2f
Setting explain
to true
is very useful when working with problems like this, as you see exactly what Lucene is doing when it's scoring.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句