Skip to content
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

Ogcapi records search #116

Merged
merged 15 commits into from
Oct 22, 2024
Merged

Conversation

davidblasby
Copy link
Contributor

@davidblasby davidblasby commented Oct 1, 2024

I am doing improvement for Searching.

queryables2.mp4
  1. Add the queryables endpoint (according to spec):
    • I've put in items from OGC Spec Table 8 and Table 9
    • Will add possibly add more from the Elastic Index JSON (later)
    • see queryables.json

2 Server side processing of the queryables for "smarter" handling:

  • See QueryToElastic.java as well as the documentation in queryables.json
  1. Will add to my Angular client to allow some searching (not in github yet, will add soon)

Summary of changes;

  1. I've added queryables.json (and some processing of it - QueryablesService QueryablesController QueryToElastic).

    • you can add to this json file to add more queryables
    • See the documentation (and examples) in the queryables.json file
    • I've added support for most of the OGCAPI spec's recommended queryable
    • I've added support for time-based (date and date_range) queries as well as text and geom queries.
  2. I introduced a Query object instead of just moving around individual parts

    • not fully integrated into the non-Queryables (existing) ogcapi search endpoint
    • should make it a bit easier to look at the query as it goes through the system
  3. I updated the checkstyle settings so you can add @SuppressWarnings.

    • useful for variables like q, and x-ogc-role that don't start with 2+ lower-case letters
    • no other changes to google_checks.xml (copied to gn_checks.xml)

How to use Queryables:

Queryables are pretty easy to use;

  1. get the queryables definition from the endpoint /collections/<collectionId>/queryables

  2. use a query like this;

See the OGCAPI documentation (also in queryables.json) for how to format date range queries.

@davidblasby
Copy link
Contributor Author

@josegar74 @fxprunayre - please review before I make it non-draft. Thanks a lot!

Copy link

sonarqubecloud bot commented Oct 9, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarCloud

@davidblasby davidblasby marked this pull request as ready for review October 16, 2024 16:23
@davidblasby
Copy link
Contributor Author

@josegar74 @fxprunayre - I am planning to merge this at the end of the week!

@davidblasby
Copy link
Contributor Author

@josegar74 @fxprunayre - no one has responded, so I will merge tomorrow evening (european time).

@davidblasby davidblasby merged commit 58dd370 into geonetwork:main Oct 22, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants