Highlighting bug where fragments are broken when number_of_fragments is 0 #479

Closed
jessiehernandez opened this Issue Nov 5, 2010 · 1 comment

Comments

Projects
None yet
2 participants

This is happening on version 0.12.1. When highlighting is specified, some of the highlight fields come complete, and some are broken. When those documents are access directly by providing the direct index as "from" and setting "size" as 1, it comes fine: Reproduce code is below (bash script):

curl -XPUT 'http://server:9200/indexname/highbug/_mapping' -d '
{
    "highbug":
    {
        "properties": 
        {

            "body":
            {
                "store": "yes",
                "term_vector": "with_positions_offsets",
                "type": "string"
            },
            "title":
            {
                "store": "yes",
                "term_vector": "with_positions_offsets",
                "type": "string"
            }
        }
    }
}
';

for (( i = 0; i < 20; ++i ))
do
    curl -XPUT "http://server:9200/indexname/highbug/$i" -d "
    {
        \"body\":  \"Test body\",
        \"date\":  \"$(date +%s)\",
        \"title\": \"This is a test on the highlighting bug present in elasticsearch\"
    }";
done

The call below returns the full highlighted fragment for the 1st and 5th results, and the 2nd through 4th results return "hting bug present in elasticsearch" instead of "This is a test on the highlighting bug present in elasticsearch".

curl -XGET 'http://server:9200/indexname/highbug/_search?pretty=true' -d '
{"query":{"query_string":{"query":"bug"}},"from":0,"size":5,"highlight":{"fields":{"title":{"number_of_fragments":0}}}}
';
Owner

kimchy commented Nov 18, 2010

Highlighting bug where fragments are broken when number_of_fragments is 0, closed by fdb98b1.

@medcl medcl pushed a commit to medcl/elasticsearch that referenced this issue Jul 1, 2011

@kimchy kimchy Highlighting bug where fragments are broken when number_of_fragments …
…is 0, closes #479.
fdb98b1

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment