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

Fix compile errors #101874

Merged

Conversation

javanna
Copy link
Member

@javanna javanna commented Nov 7, 2023

IndexDiskUsageAnalyzer and IndexDiskUsageAnalyzerTests, as well as CompletionFieldMapper, CompletionFieldMapperTests and CompletionStatsCacheTests need adjusting after apache/lucene#12741 , to refer to the latest postings format.
KuromojiTokenizerFactory needs adjusting after apache/lucene#12390

IndexDiskUsageAnalyzer needs adjusting after apache/lucene#12741
@javanna javanna added >non-issue :Search/Search Search-related issues that do not fall into other categories v8.12.0 labels Nov 7, 2023
@javanna javanna requested a review from jpountz November 7, 2023 13:44
@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label Nov 7, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@javanna javanna changed the title Fix compile error Fix compile errors Nov 7, 2023
import org.apache.lucene.codecs.DocValuesProducer;
import org.apache.lucene.codecs.FieldsProducer;
import org.apache.lucene.codecs.KnnVectorsReader;
import org.apache.lucene.codecs.NormsProducer;
import org.apache.lucene.codecs.PointsReader;
import org.apache.lucene.codecs.StoredFieldsReader;
import org.apache.lucene.codecs.TermVectorsReader;
import org.apache.lucene.codecs.lucene90.Lucene90PostingsFormat;
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure if besides updating the import for 90 we need an additional conditional for 99 here

Copy link
Member

Choose a reason for hiding this comment

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

It seems like we should have one. I honestly don't know, we have one for other older formats :/

Copy link
Member

Choose a reason for hiding this comment

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

So we don't forget, could you make that change in this PR or add a TODO?

Copy link
Member Author

Choose a reason for hiding this comment

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

I pushed the change, I don't feel good about no failing tests with or without it though.

Copy link
Member

Choose a reason for hiding this comment

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

I pushed the change, I don't feel good about no failing tests with or without it though.

No test fails because we miss an inverted index unit test, and the assertion in the IT test is too relaxed. There's a strict assertion in a unit test, but it compares the results between the per-field format and the regular format, both of which silently skip a term state if the format is missing. Can you add an assertion at the end of these format checks to ensure we won't forget to add a new format here? I can add an inverted index unit test next week.

It seems like we should have one. I honestly don't know, we have one for other older formats :/

Yes, and we should have BWC tests for this API too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @dnhatn I pushed 120f35c .

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, Luca!

import org.apache.lucene.codecs.DocValuesProducer;
import org.apache.lucene.codecs.FieldsProducer;
import org.apache.lucene.codecs.KnnVectorsReader;
import org.apache.lucene.codecs.NormsProducer;
import org.apache.lucene.codecs.PointsReader;
import org.apache.lucene.codecs.StoredFieldsReader;
import org.apache.lucene.codecs.TermVectorsReader;
import org.apache.lucene.codecs.lucene90.Lucene90PostingsFormat;
Copy link
Member

Choose a reason for hiding this comment

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

I pushed the change, I don't feel good about no failing tests with or without it though.

No test fails because we miss an inverted index unit test, and the assertion in the IT test is too relaxed. There's a strict assertion in a unit test, but it compares the results between the per-field format and the regular format, both of which silently skip a term state if the format is missing. Can you add an assertion at the end of these format checks to ensure we won't forget to add a new format here? I can add an inverted index unit test next week.

It seems like we should have one. I honestly don't know, we have one for other older formats :/

Yes, and we should have BWC tests for this API too.

@javanna javanna merged commit 180ef28 into elastic:lucene_snapshot Nov 9, 2023
13 checks passed
@javanna javanna deleted the fix/lucene_90_postings_format branch November 9, 2023 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants