elasticsearch-mapper-attachments
을 사용하여 색인 생성 된 첨부 파일 내용 내에서 ElasticSearch가 히트를 강조 표시하는 데 문제가 있습니다. /stuff/file
에서ElasticSearch를 사용하여 첨부 파일 내용 내 히트 수를
내 데이터는 다음과 같습니다
{
"file" : {
"properties" : {
"attachment" : {
"type" : "attachment",
"path" : "full",
"fields": {
"name": { "store": true },
"title": { "store": true },
"content": { "store": true },
"attachment": {
"type": "string",
"term_vector": "with_positions_offsets",
"store": true
}
}
}
}
}
}
을 내가 /stuff/_mapper/file
그것을 쿼리 할 때 나는이 반환받을 :
{
"id": "string"
"name": "string"
"attachment": "...base 64 encoded file"
}
/stuff/file/_mapper
에 넣어 내 매퍼 구성은 다음과 같습니다
{
"stuff":{
"mappings":{
"file":{
"properties":{
"attachment":{
"type":"attachment",
"path":"full",
"fields":{
"attachment":{
"type":"string"
},
"author":{
"type":"string"
},
"title":{
"type":"string"
},
"name":{
"type":"string"
},
"date":{
"type":"date",
"format":"dateOptionalTime"
},
"keywords":{
"type":"string"
},
"content_type":{
"type":"string"
},
"content_length":{
"type":"integer"
},
"language":{
"type":"string"
}
}
},
"id":{
"type":"string"
},
"name":{
"type":"string"
}
}
}
}
}
}
내 검색어는 t 그의 :
{
"size": 30,
"query": {
"multi_match": {
"query": "{{.Query}}",
"operator": "and",
"fields": ["id", "name^4", "attachment"],
"fuzziness": "AUTO",
"minimum_should_match": "80%"
}
},
"highlight" : {
"fields" : {
"attachment": { }
}
}
}
내가 첨부 파일에있는 용어를 검색 할 때, 올바른 결과를 반환하지만 더 강조가 없습니다. 몇 년 전 비슷한 질문이 있었는데 attachment
을 file
으로 바꿨지 만 다시 변경되었다는 의견이있었습니다 ... 강조 표시를 작동 시키려면 어떤 구성이 필요합니까?
동일한 문제가있는 iam ... 첨부 파일 강조 표시는 탄성 찾기 1.7에서 지원되지 않을까요? –