문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top