Skip to content

Conversation

@burqen
Copy link
Contributor

@burqen burqen commented Nov 28, 2025

Synthetic _id fields doesn't have an inverted index, but will pretend to have it on the read path by injecting IndexOptions.DOCS on the _id field. We short circuit IndexDiskUsageAnalyzer if we see a synthetic _id field.

@burqen burqen added >enhancement :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. labels Nov 28, 2025
@burqen burqen requested a review from fcofdez November 28, 2025 08:29
@elasticsearchmachine elasticsearchmachine added v9.3.0 Team:Distributed Indexing Meta label for Distributed Indexing team labels Nov 28, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing)

@elasticsearchmachine
Copy link
Collaborator

Hi @burqen, I've created a changelog YAML for you.

@burqen
Copy link
Contributor Author

burqen commented Nov 28, 2025

I didn't add any tests for it but it will be tested through TSDBSyntheticIdsIT once #138515 has been merged.

Copy link
Contributor

@fcofdez fcofdez left a comment

Choose a reason for hiding this comment

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

LGTM

continue;
}
if (SyntheticIdField.hasSyntheticIdAttributes(field.attributes())) {
// Synthetic _id field doesn't have an inverted index stored on disk,
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can assert that the terms class is not any of the ones expected in getBlockTermState?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, some assertion here is a good idea.
I would rather assert that the Terms / TermsEnum / TermState is of the class that we expect but I cannot do that on this branch, since that will change in later PRs and we are not even reaching this if-branch on this git-branch #overloaded . Perhaps we can add that assertion in later PRs?
I'll at least assert that the field is _id as expected.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good to me 👍

Copy link
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. >enhancement Team:Distributed Indexing Meta label for Distributed Indexing team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants