Open jahow opened 8 months ago
Quick reply before checking;
The second "drill-down" query mirrors the typical behavior of a user when using facets:
/items
query/aggregation/{aggregationId}
queryAlternatively a user could decide to zoom in on a histogram, which would also trigger the drill-down query.
WRT the term "facets". I did a bit of research. First, this terms, after checking numerous OGC Standards, is not used. This is would be the first use in an OGC Standard. Therefore, a very clear definition of what is meant by ther term "facet" is required, Second, I also researched the use of the term on the broader Catalog context. While "facet search" is in Wikipedia (https://en.wikipedia.org/wiki/Faceted_search). If one digs more deeply, in Library Science, there are pre-facet and post-facet searches. In another context, facets are shown as panels of aggregated results on a web page (e.g. HCL Software). Finally, the use of the term facet in GIS goes back to 1965, although in a completely different context - a unit of storage
As such, if the term facet/facets is to be used in the API - Records standard, then the term need to be very clearly defined and formally agreed to.
Oh, and to just make life interesting: Forecasting a Continuum of Environmental Threats (FACETs)
Thanks for the analysis @cnreediii. I feel like the term "aggregation" is closer to what is really happening, and would also better apply to the Features API (which is our intention eventually) where the concept of "faceted search" would sound even more unusual.
Hi team, great work here, i'm wondering, why are we using a dictionary for the facets, with the facet property as key, wouldn't it be more logical to have an array of facets (similar to a array of features)?
{"facets": [{
"id": "keywords",
"type": "",
"buckets":[]
}]}
it could have been me suggesting this at one point, but now while implementing, i have my doubts
Hi team, great work here, i'm wondering, why are we using a dictionary for the facets, with the facet property as key, wouldn't it be more logical to have an array of facets (similar to a array of features)?
{"facets": [{ "id": "keywords", "type": "", "buckets":[] }]}
it could have been me suggesting this at one point, but now while implementing, i have my doubts
No I think I came up with the dict structure and indeed it is useless if we end up repeating the id in the facet object; I also liked having an id
field for each facet, to make it clear that this is the id that the user can then use in other queries; conversely, using the facet id as the dictionary key isn't all that clear IMO
another thought here; which properties to add as facet should be a configuration, not something defined in the api schema, this allows for adjustments of the configured facets, without redefining the api definition
alternatively it can be argued that by hardcoding the facets in the api schema, it will be clear by users beforehand which facets will be made available in the search result
Discussion/refresh during 2024 Joint OGC-ASF-OSGeo Code Sprint:
Two Requirements Classes: Simple and Advanced
/collections/{collectionId}/facetables
/collections/{collectionId}/queryables
with a facet
object definition for each facet-supported queryable.../items
query default behaviour (to enable faceted-search or not)
facets
API parameter. Options:all
: all server configured facetsfacet_name:num_buckets
facets
property?/collections/{collectionId}/facets
for these types of queriesDiscussion with @cportele:
Decision:
/collections/{collectionId}/queryables
(part 5).../items
facets=true
or facets.propertyname
x-ogc-facet
Advanced/collections/{collectionId}/facets/{facetId}
- drill down (advanced)Next steps are to close this PR and start the extension draft.
About the quaryable configuration; can it have 3 options:
facets parameter can then have 3 values:
I most appreciate the behavior of some facets being returned with every search result, without the need to configure a facets parameter
want to refer to https://github.com/opengeospatial/ogcapi-features/issues/681 facet functionality could offer the requested functionality
Just to be sure I understand. Facets, also called smart filters, are a type of search filter that customers use to narrow down their search results quickly. Facets can be static (set up for every query) or dynamic (they can change depending on the context of the search query). Am I correct in my understanding? There is a fairly wide scope of definitions by different vendors. Thanks
FYI as decided in https://github.com/opengeospatial/ogcapi-records/pull/320#issuecomment-1966599940, PR #372 adds OGC API - Records - Part 2: Facets. Once this PR is merged we can move the contents of this PR into the appropriate areas of the extension.
This PR builds on top of the work by @pvgenuchten to offer a more detailed proposal, including two new endpoints which should let API consumers build a robust user experience.
The YAML schemas have not been updated yet, and there are several questions which still have to be answered:
/items
response? (instead of just letting them say yes/no)/aggregation/{aggregationId}
) which will carry over many of the query params used in/items
so as to end up matching the same records as a search on/items
would?Looking forward to discuss all these topics further before the end of the sprint! Please leave comments/suggestions as needed.