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

Highlight.max_analyzed_offset not included in Highlight object #185

Open
renatoaraujoc opened this issue Sep 18, 2023 · 1 comment
Open

Comments

@renatoaraujoc
Copy link

Hello,

I've just started using this library and its amazing, thank you for such a beautiful work!

I'm indexing big documents and I've been getting the max_analyzed_offset error.

The issue is that I can set a max_analyzed_offset for the indice creation but not for the Highlight query like it's mentioned on the docs:

max_analyzed_offset
By default, the maximum number of characters analyzed for a highlight request is bounded by the value defined in the [index.highlight.max_analyzed_offset](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-analyzed-offset) setting, and when the number of characters exceeds this limit an error is returned. If this setting is set to a non-negative value, the highlighting stops at this defined maximum limit, and the rest of the text is not processed, thus not highlighted and no error is returned. The [max_analyzed_offset](https://www.elastic.co/guide/en/elasticsearch/reference/current/highlighting.html#max-analyzed-offset) query setting does not override the [index.highlight.max_analyzed_offset](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-analyzed-offset) which prevails when it’s set to lower value than the query setting.

Url is: https://www.elastic.co/guide/en/elasticsearch/reference/current/highlighting.html

Right now, I'm being forced to bump the index.highlight.max_analyzed_offset to 3000000 which is not desirable as can eats lots of memory on searches.

Could this feature be enabled somehow?

Thank you!

@sudo-suhas
Copy link
Owner

This setting was added in Elasticsearch 7.12. A PR to add this feature to highlighting would be welcome.

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

2 participants