-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
Documentation / Elasticsearch query endpoint - query samples #7722
Documentation / Elasticsearch query endpoint - query samples #7722
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very much appreciated, I am providing some suggestions inline, but they are not required.
-
The previous documentation (which people are migrating from provided) some discussion of the parameters, and ready to use example against localhost: https://docs.geonetwork-opensource.org/3.12/api/search/#query-examples
-
Running from swagger is arguably more useful (than providing localhost:8080 example).
Following the instructions I was able to produce the following curl command:
curl -X POST "https://how2map.geocat.live/geonetwork/srv/api/search/records/_search?bucket=metadata" -H "accept: application/json" -H "Content-Type: application/json" -H "X-XSRF-TOKEN: 5c4837fd-3e39-489b-8e80-db298503541d" -d "{\"query\":{\"bool\":{\"must\":[{\"query_string\":{\"query\":\"+anytext: ocean \"}}],\"filter\":[{\"term\":{\"isTemplate\":{\"value\":\"n\"}}}]}}}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josegar74 I have updated the PR based on my feedback.
Changes:
- Documented both _search and _msearch
- Headings for each example (so we can specifically link to them when sharing an example with a customer).
- Ideally I would like this page to grow over time as we answer support questions
Co-authored-by: François Prunayre <[email protected]>
Co-authored-by: François Prunayre <[email protected]>
Co-authored-by: François Prunayre <[email protected]>
Checklist
main
branch, backports managed with labelREADME.md
filespom.xml
dependency management. Update build documentation with intended library use and library tutorials or documentation