Skip to content

Indexing changes#197

Closed
alchemist51 wants to merge 15 commits intofeature/datafusionfrom
indexing-changes
Closed

Indexing changes#197
alchemist51 wants to merge 15 commits intofeature/datafusionfrom
indexing-changes

Conversation

@alchemist51
Copy link
Copy Markdown
Owner

Description

[Describe what this change achieves]

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
Comment on lines +44 to +49
public FileInfos flush(FlushIn flushIn) throws IOException {
writer.forceMerge(1);
WriterFileSet.Builder writerFileSetBuilder =
WriterFileSet.builder().directory(directoryPath).writerGeneration(writerGeneration).addNumRows(writer.getDocStats().numDocs);
return FileInfos.builder().putWriterFileSet(DataFormat.LUCENE, writerFileSetBuilder.build()).build();
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why are we performing a force merge in flush?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Each CompositeWriter creates a child parquet writer and lucene writer. The lucene writer can have more than 1 segments hence to keep the mapping consistent between a lucene and parquet segment we have to do a force merge.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Please use this as the primary PR on the feature branch: https://github.com/opensearch-project/OpenSearch/pull/20790/changes

I will mark this close to avoid confusion

@alchemist51 alchemist51 closed this Mar 9, 2026
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