opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.47k stars 1.74k forks source link

[Feature Request] Placing lucene packages outside of server module #15317

Open sarthakaggarwal97 opened 3 weeks ago

sarthakaggarwal97 commented 3 weeks ago

Is your feature request related to a problem? Please describe

Currently, we have many lucene package based classes under a different package structure (org.apache.lucene) This issue is to discuss whether theses classes and components can be moved outside of the server to /lib

Describe the solution you'd like

We should discuss we can move these components to outside of server for v3.0, while making sure we don't break any flows.

Related component

Libraries

Describe alternatives you've considered

No response

Additional context

https://github.com/opensearch-project/OpenSearch/pull/15278#discussion_r1722548681

andrross commented 2 weeks ago

@sarthakaggarwal97 I believe the only reason to use org.apache.lucene is to access package-private methods/fields in Lucene. This isn't a great practice as it means we're using something that is not intended to be used directly outside of Lucene. I think we should try to avoid this whenever possible and I would be concerned that moving this code to its own library might encourage more use of this pattern.

dblock commented 5 days ago

[Catch All Triage - 1, 2, 3, 4, 5]