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

Documentation / Elasticsearch query endpoint - query samples #7722

Merged

Conversation

josegar74
Copy link
Member

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@josegar74 josegar74 added this to the 4.4.3 milestone Feb 8, 2024
Copy link
Contributor

@jodygarnett jodygarnett left a 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.

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\"}}}]}}}"

docs/manual/docs/api/search.md Outdated Show resolved Hide resolved
docs/manual/docs/api/search.md Outdated Show resolved Hide resolved
Copy link
Contributor

@jodygarnett jodygarnett left a 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

josegar74 and others added 3 commits February 9, 2024 08:37
@josegar74 josegar74 added the Documentation Documentation writing & improvements label Feb 9, 2024
@josegar74 josegar74 merged commit c697e5b into geonetwork:main Feb 9, 2024
8 checks passed
@jodygarnett jodygarnett deleted the documentation-elasticsearch-queryexamples branch February 9, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 4.2.x Documentation Documentation writing & improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants