reta commented on PR #11875: URL: https://github.com/apache/lucene/pull/11875#issuecomment-1298432816
Thanks @jpountz, no problem at all. > Sorry for the lag I'm on vacation. > > The problem with "this class may be useful outside of Lucene" to me is that it could apply to any class in Lucene. We did indeed make some classes public on this criterion in the past (e.g FixedBitSet), but I would like the bar to be high, is there really not a better way? Is the need to make this class public a sign that the functionality is not exposed the right way? I think you are getting straight feedback from the users (OpenSearch in this case, possibly Elasticsearch): this class is useful outside of Lucene for the reasons highlighted above. So from my perspective, it falls into "Is the need to make this class public a sign that the functionality is not exposed the right way?" bucket. > > For the case described above by Vigya, I can think of two alternatives we might want to consider instead: > > Copy the code for this time-limiting bulk scorer instead of using the Lucene class. If there is only a couple users of Lucene who would benefit from this class being public, maybe it's a better trade-off to let them take full ownership of this code to allow Lucene to keep treating it as an implementation detail? Copy / Paste is always the option. I opened the issue to highlight that probably we could avoid that by addressing "functionality is not exposed the right way". From the contributor perspective, I see that historically a lot of things were copy / pasted from Lucene into OpenSearch for (probably) same reasons - it is simpler than suggesting the change. > Figure out different refactors that would help OpenSearch leverage timeout support from IndexSearcher as-is. E.g. if it would fold the logic to use live docs to lead iteration in the weight wrapper, would that work? The refactor is on the table for sure, the implementation is very different from the Lucene for reasons I have no knowledge of, sadly (at least at this moment), so this is not on the table. -- 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