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

add ignore_above support for nrtsearch #735

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

taoyyu
Copy link
Contributor

@taoyyu taoyyu commented Sep 27, 2024

Ouroboros cluster has long text which can reach the lucene limit 32766 and ingestion got stuck.
They use ignore_above in the legacy ES schema. Adding same support for NRT.

Comment on lines 237 to 239
if (ignoreAbove > 0 && fieldStr.length() > ignoreAbove) {
continue;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this value still need to be retrievable somehow? This would keep it from being stored anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goal of ignoreAbove is to avoid the lucene limit 32766. docValue also has this limit for Sorted and SortedSet. It will be only retrievable if it is Binary DocValue or Stored. So I just dropped it for all.

Do you think I should keep for Stored fields only?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that for elasticsearch this setting keeps the value from being indexed or stored. Though for ES the _source would still contain the value.

I assume the client will want the value at some point (?). This could maybe be done in the field itself, though a child field could also be used potentially.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what would be the best approach to do it in the field itself. I'll store the binary doc value if the doc type is binary already(It should work with Orbs case here. All large text field in orbs are single value text).

If it field is declared with Sorted or Sorted Set doc value, I cannot store it as Binary for large text, it will break sorting. Or if I store with the stored field, the fillDocTask will try to read from doc values since the field definition hasDocValues is true. It would be better if we can force retrieve from doc value. or stored fields, then we can retrieve the text from stored values.

I'll add the logic to store binary doc value for the single text field first to make sure orbs can work. For further improvements, I think we can do it in a separate pr since the current master breaks for large text any way.

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

Successfully merging this pull request may close these issues.

2 participants