/ readthedocs.org Public
Search: use with_positions_offsets term vector for some fields #7724
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge.
Big documents will take some time (and memory) to find and highlight results.
Using a term vector will reduce this computation,
but it will increase the size of the index.
We have a lot of free space, so we are fine.
This was working before for big documents because there wasn't a limit
by default https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html#_limiting_the_length_of_an_analyzed_text_during_highlighting
I added this only to fields that can be big, the other text fields don't think will get much from this change, but let me know if you want me to put this on all text fields.