Hi all,

I have some specific requirements for highlighting. I need to search in 
full content of item for phrase, and then show on which page searched 
phrase is occuring. So i've created one field named text_content and fields 
named text_content_{page_number} (text_content_1, text_content_2, etc.).
Example query is:
{
    "highlight": {
        "fields": {
            "text_content_*": {}
        }
    }, 
    "query": {
        "match": {
            "text_content": "lorem"
        }
    }, 
    "size": 40
}

I've noticed that this query is fast, but only if i have small number of 
documents in index. Quiering for documents is always fast (<40ms), but 
highlight phase time is growing when number of documents in index is 
growing.
I've stared thinking that highlighting may be processed before appending 
"size": 40 - on the all matched documents. It's correct? How can in speed 
up such case?

Regards,
Karol

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/b8354eb3-3a75-4999-a180-6493240eb0cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to