elasticsearch - Elastic search exact match search on attachment type content -
i trying perform exact search match in content of indexed files (pdfs) have been correctly indexed es using attachment plugin.
i know perform exact match search have specify "index" : "not_analyzed"
in mapping of specific field.
i tried to same attachment type seems not working expected. tested following 2 mappings:
{ doc: { "properties": { file : { "type" : "attachment", "index" : "not_analyzed", "fields" : { "title" : { "store" : "yes" }, "file" : { "term_vector":"with_positions_offsets", "store":"yes" } } } } } } { doc: { "properties": { file : { "type" : "attachment", "fields" : { "title" : { "store" : "yes" }, "file" : { "term_vector":"with_positions_offsets", "store":"yes", "index" : "not_analyzed" } } } } } }
but didn't me achieve exact search match wanted.
could please provide me on this? know if attachment plugin supports exact match search? if not please suggest alternative approach?
thank you.
i believe have {"index": "not_analyzed"}
in wrong location, should within fields section. try mapping instead:
{ doc: { "properties": { file : { "type" : "attachment", "fields" : { "title" : { "store" : "yes" }, "file" : { "index" : "not_analyzed"} } } } } }
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-attachment-type.html
Comments
Post a Comment