Created
July 21, 2018 11:06
-
-
Save tisto/36944bed536305a74d4e75e7b66bac5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Search docs for plone.restapi: | |
http://plonerestapi.readthedocs.io/en/latest/searching.html | |
API design discussion: | |
https://github.com/plone/plone.restapi/issues/45 | |
Query | |
----- | |
Simple query:: | |
GET /plone/@search?SearchableText=lorem | |
Simple query on title field:: | |
GET /plone/@search?Title=lorem | |
Simple query on title field with portal_type filter:: | |
GET /plone/@search?Title=lorem&portal_type=Document | |
Type Hints | |
---------- | |
Type hints on search fields:: | |
GET /plone/@search?numeric_field=42:int | |
Complex query options:: | |
query = {'path': {'query': '/folder', | |
'depth': 2}} | |
Can be encoded in the URL like this:: | |
GET /plone/@search?path.query=%2Ffolder&path.depth=2 | |
Facets | |
------ | |
Enable facets:: | |
GET /plone/@search?Title=lorem&facet=true | |
Provide facet field: | |
GET /plone/@search?Title=lorem&facet=true&facet_field=portal_type | |
Provide multiple facet fields: | |
GET /plone/@search? | |
Title=lorem& | |
facet=true& | |
facet_field:list=portal_type& | |
facet_field:list=review_state | |
Provide multiple facet fields with filter values: | |
GET /plone/@search? | |
Title=lorem | |
portal_type=Document | |
review_state=published | |
facet=true | |
facet_field:list=portal_type | |
facet_field:list=review_state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follow up:
https://docs.google.com/document/d/1xooubzJKBnUzVlsa2f0GSwvuE1oir9hUdWUf1SU9S6E/edit#