중복 된 필드가있는 일부 데이터가 있습니다. 중복 결과가 검색 결과 상단에 함께 표시되는 것을 원하지는 않지만이를 모두 제거하고 싶지는 않습니다. 나는 단지 더 나은 품종을 원한다. 그래서 동일한 field-value의 두 번째, 세 번째 ... n 번째 출현이 강등 될 것이다. ElasticSearch로 가능합니까? 예를 들어ElasticSearch에서 처벌 - 중복을 제거하지 않음 -
:
( this 기준)curl -XPOST 'http://localhost:9200/employeeid/info/1' -d '{
"name": "John",
"organisation": "Apple",
"importance": 1000
}'
curl -XPOST 'http://localhost:9200/employeeid/info/2' -d '{
"name":"John",
"organisation":"Apple",
"importance": 2000
}'
curl -XPOST 'http://localhost:9200/employeeid/info/3' -d '{
"name": "Sam",
"organisation": "Apple",
"importance": 0
}'
우리가 검색이 중요성에 의해 증폭된다고 가정하면, "애플"검색을위한 자연적인 결과는 John
, John
, Sam
될 것이다. 내가 찾고있는 것은 결과를 만드는 방법이다. John
, Sam
, John
, 또 다른 John
이 이미 나타나기 때문에 두 번째로 불이익을 주었다.
_score에 대한 값을 가정 https://www.elastic.co/ guide/ko/elasticsearch/reference/current/modules-scripting-painless.html, https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-advan ced-scripting.html. –