SOLR-16825: Migrate v2 definitions to 'api' module, pt 6#1978
SOLR-16825: Migrate v2 definitions to 'api' module, pt 6#1978gerlowskija merged 6 commits intoapache:mainfrom
Conversation
Allows these APIs to be included in SolrRequest generation in SolrJ.
|
❗ ❗ Naming Emergency ❗ ❗ Many v2 APIs are currently offered at two paths based on whether a user is providing a core or a collection name. For example, schema APIs are available at both Trying to define these APIs concisely puts us in the awkward place of needing a generic term for either a core or a collection. So far in this PR I've made due with "index", but I'm not terribly happy with it. This choice appears in a few places:
It's a somewhat consequential naming decision, as it'll recur in the generated SolrJ code for most of our per core-or-collection APIs: Do we already have some generic term to refer to a core or collection? Does anyone have any good ideas? |
|
|
|
You know, if you want a single term in place of "core" and "collection" in Apache Solr's RESTful URLs, here are some potential terms you could consider: These terms can convey the idea of a logical grouping or container for data within Solr, similar to the concept of a core or collection. |
|
^ above was generated ;-). I never write like that. I think I like anything BUT "index" because I think that is an overloaded term that has specific meaning the closer to disk you get.. A Collection is NEVER a index. Resource? Container? |
|
|
Haha, someone's enjoying their LLM's this morning 😛 "Store" is a tad generic for my tastes, but I like it better than "index" I think? We would have "store type" (which could either be 'collection' or 'core') and "store name" (which would be the actual name of the collection/core). |
|
I'm also cool with resourceType and resourceName, but store is cool too. |
|
I think in the balance, I'm leaning to towards "store", because resources could mean many thing... "dataStoreType" and "dataStoreName" ? Or, we could just rip the bandaid off and get rid of What if we had |
|
These API's are all experimental and new, so introducing |
Also merges GetSchemaAPI and GetSchemaZkVersionAPI, since there's no real need for them to be separate.
|
I think I'll go with "store" as the term for now. I kindof agree with Eric that "resource" is maybe too generic? It's also an overloaded term, as JAX-RS/Jersey calls API classes "resources" too. We'll be able to change this later if folks find it doesn't work well in practice. (Also, I suspected it from his comments above, but confirmed with @epugh offline that some of the other suggestions, i.e. Will aim to update this PR shortly with the new name, and merge. Thanks for the help guys! |
This commit covers various GET /schema APIss well as delete-shard. Extracting annotated interfaces for these APIs includes them in the SolrRequest- generation we now do in SolrJ
https://issues.apache.org/jira/browse/SOLR-16825
Description
SOLR-16825 added a new gradle module, 'api', which holds v2 API definitions as interfaces. This allows us to generate an OAS (and SolrRequest implementations from that) as a part of the solrj build.
But these artifacts (the OAS and generated Java code), only cover the v2 APIs that have interfaces in the 'api' module. We need to extract interfaces to live in 'api' for each v2 API in 'core' that doesn't already have one.
Solution
This PR creates 'api' interfaces for a number of v2 APIs, allowing SolrRequest implementations to be generated for them. The following APIs are covered in this PR:
Tests
PR is a refactor, so doesn't add any additional tests. But manual testing has been done to make sure the affected v2 APIs continue to work, and existing tests continue to pass.
Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.