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

Multi-term synonyms not highlighting correctly #1444

Closed
ppearcy opened this issue Nov 7, 2011 · 5 comments
Closed

Multi-term synonyms not highlighting correctly #1444

ppearcy opened this issue Nov 7, 2011 · 5 comments

Comments

@ppearcy
Copy link
Contributor

ppearcy commented Nov 7, 2011

It appears that when using a synonym filter and there are multi-term synonyms, highlighting doesn't always work correctly.

Details how to reproduce are here:
https://gist.github.com/1317149

@ppearcy
Copy link
Contributor Author

ppearcy commented Nov 9, 2011

Hitting a different case, where instead of wrong highlighting the search errors out:
https://gist.github.com/1349777

I am going to see if I can dig into this.

@ppearcy
Copy link
Contributor Author

ppearcy commented Nov 10, 2011

Interestingly, for the last gist I posted, if the stemmer is removed, the error doesn't occur.

@ppearcy
Copy link
Contributor Author

ppearcy commented Nov 10, 2011

Digging into the search failure I'm getting, the first thing that I see is that the TermOffset info looks incorrect for the document I've indexed. For the "vaccines" term, it lists the following offsets:
start = 25
end = 33

start = 0
end = 0

The 0/0 is causing the error. Trying to figure out why this is getting set this way.

@ppearcy
Copy link
Contributor Author

ppearcy commented Jan 17, 2012

Looks like this is addressed:
https://issues.apache.org/jira/browse/LUCENE-3668

@ppearcy
Copy link
Contributor Author

ppearcy commented Jan 19, 2012

Closing in lieu of:
#1401

@ppearcy ppearcy closed this as completed Jan 19, 2012
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
The BlockAwareJsonParser is used to set a checkpoint on a JSON stream
and exit the current blocks that the cursor is in back to the same
level of the content that it was created at. If skipChildren is called
to skip over an open array or object, the internal level counter will
not be updated to account for the array or object that was skipped over.

This PR updates the skipChildren method to check the currentToken and
conditionally decrement the internal nested level counter if we ended
up at an end of an array or object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant