Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fast vector highlighter not working properly with the percolator #5129

Closed
brwe opened this issue Feb 14, 2014 · 0 comments
Closed

fast vector highlighter not working properly with the percolator #5129

brwe opened this issue Feb 14, 2014 · 0 comments
Labels

Comments

@brwe
Copy link
Contributor

brwe commented Feb 14, 2014

Results when using fast vector highlighter with the percolator are wrong. The test below reproduces this. The reason is a bug in MemoryIndex, see https://issues.apache.org/jira/browse/LUCENE-5444

Will be resolved with lucene 4.7

DELETE phrasetest


PUT phrasetest
{
   "mappings": {
      "doc": {
         "properties": {
            "body": {
               "properties": {
                  "text": {
                     "type": "string",
                     "term_vector": "with_positions_offsets"
                  }
               }
            }
         }
      }
   }
}

POST phrasetest/_refresh

POST phrasetest/.percolator/Q
{
   "query": {
      "match": {
         "text": {
            "query": "foo bar"
         }
      }
   }
}


POST phrasetest/doc/_percolate
{
   "doc": {
      "body": [
         {
            "text": "la la"
         },
         {
            "text": "foo bar foo bar foo"
         }
      ]
   },
   "size": 1,
   "highlight": {
      "fields": {
         "body.text": {
            "type": "fvh",
            "number_of_fragments": 20
         }
      }
   }
}

yields:

...
"highlight": {
            "body.text": [
               "<em>la </em>la",
               "fo<em>o b</em>a<em>r f</em>o<em>o b</em>ar foo"
            ]
         }
...
s1monw added a commit that referenced this issue Feb 19, 2014
Closes #5104
Closes #5129
Closes #3757
jpountz pushed a commit to jpountz/elasticsearch that referenced this issue Feb 26, 2014
@s1monw s1monw closed this as completed in 30d7b8d Feb 26, 2014
s1monw added a commit that referenced this issue Feb 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants