-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product summary object has an incomplete "properties" set #277
Comments
To move forward on that we will:
|
For step 1, we could use the field _field_names (new since opensearch 1.3) and do an aggregation on it, as proposed on stackoverflow https://stackoverflow.com/questions/23378365/list-all-fields-in-an-elasticsearch-index, the aggregation command would be:
|
Ooops that is an elasticsearch feature, that might not exist in OpenSearch... |
Apparently it is not possible anymore in elasticSearch, since version 5, to use _field_names in aggregation and it did not work either in OpenSearch, tested locally with OpenSearch v2.6. The propose alternative is to use the _mapping end-point which can not be subsetted depending on search criteria. To move forward I suggest to proceed to step 2: create a new /properties end-point to get the list of available properties for the full dataset. I assign the ticket to @alexdunnjpl for that job. Some specification for the new end-point:
|
Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
Currently, per @tloubrieu-jpl, the properties enumeration contained in the response returned from an endpoint like
/products/?q=someQuery
only contains an enumeration for the products contained in the page, which may be incomplete.Initially-proposed requirement: provide full enumeration of properties with every page.
Problem: This is O(n^2) with the number of products, as each page of API results would then require the API to iterate over all (pages of/products in) hits returned by the db.
Proposed solution: Do not provide
properties
information in the endpoint used to access products. Instead, implement an endpoint to explicitly request this information, like/products/properties/?someQuery
, which reduces "get the full set of properties and get all the products" to O(n) and avoids the need to mess around with caching.🕵️ Expected behavior
I expect (tentatively, pending approval)
properties
object is not returned in summary object/products/properties
endpoint implemented/collections/properties
endpoint implemented/bundles/properties
endpoint implementedThe text was updated successfully, but these errors were encountered: