I am basically indexing pdfs.
Then I am searching them and I am using the highlight field to preview the search results.
The problem is, that for each search query, I am getting the whole attachment back in the _source field.
Is there a way to disable this?
My search query:
POST /documents/document/_search
{
"query": {
"multi_match": {
"query": "Fault",
"fields": ["author^2","tags","doc.content"]
}},
"highlight" : {
"fields" : {
"*" : {}
}
}
}
And my schema:
POST /documents
{
"mappings": {
"document": {
"properties": {
"doc": {
"type": "attachment",
"fields": {
"content": {
"type": "string",
"term_vector": "with_positions_offsets",
"store": true
}
}
},
"author": {
"type": "string"
},
"pub_date": {
"type": "date"
},
"tags": {
"type": "string"
}
}
}
}
}