Currently I am using following search query to highlight stuff based on the query entered. Index is made via FsCrawler.

GET index_name/_search
{
    "query": {
        "query_string" :{
            "query": "my_string_query_here"
        }
    },
    "size": 10,
    "highlight" : {
      "pre_tags": ["<em>"], 
      "post_tags": ["</em>"], 
        "fields" : {
            "*" : {"fragment_size" : 150, "number_of_fragments" : 1}
        }
    }
}

I am able to get to get the desired result. But the problem is the delay which Elasticsearch takes while giving its response on files having large content field (which is understandable). Is there any way to apply highlight only in those documents which are under some specified file size.

0

There are 0 best solutions below