vigyasharma commented on issue #13387:
URL: https://github.com/apache/lucene/issues/13387#issuecomment-2354135495

   I wonder if we can leverage IndexWriter's `addIndexes(Directory... dirs)` 
[API](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java#L2984)
 for this. We could create separate indexes for every category (log groups 2xx, 
4xx, 5xx in the example here), and combine them into one using this API. 
Internally, this version of the API simply copies over all segment files in the 
directory, so it should be pretty fast.
   
   This could mean that each shard for an OpenSearch/Elasticsearch index would 
maintain internal indexes for each desired category, and use the API to combine 
them into a common "shard" index at every flush? We'd still need a way to 
maintain category labels for a segment during merging, but that's a common 
problem for any approach we take.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to