Skip to content

Commit

Permalink
[fc] Repository: plone.restapi
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2018-09-08T12:19:10+02:00
Author: Lukas Graf (lukasgraf) <lukas.graf@4teamwork.ch>
Commit: plone/plone.restapi@e10f04a

Docs: Add note to clarify that @search endpoint includes container

in results by default.

Files changed:
M docs/source/searching.rst
Repository: plone.restapi

Branch: refs/heads/master
Date: 2018-09-08T20:23:51+02:00
Author: Timo Stollenwerk (tisto) <tisto@users.noreply.github.com>
Commit: plone/plone.restapi@b42e547

Merge pull request #617 from plone/docs-search-container

Docs: Add note to clarify that @search endpoint includes container in results by default.

Files changed:
M docs/source/searching.rst
  • Loading branch information
tisto committed Sep 8, 2018
1 parent 9067dfd commit dddd78c
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions last_commit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,33 @@ Repository: plone.restapi


Branch: refs/heads/master
Date: 2018-09-06T15:20:36+02:00
Author: Sune Broendum Woeller (sunew) <sune@woeller.dk>
Commit: https://github.com/plone/plone.restapi/commit/aea5f9b79498aecd300085128c5c7b8a567e490c
Date: 2018-09-08T12:19:10+02:00
Author: Lukas Graf (lukasgraf) <lukas.graf@4teamwork.ch>
Commit: https://github.com/plone/plone.restapi/commit/e10f04ab44aaa000644643463f887367b4472914

Docs: small fix
Docs: Add note to clarify that @search endpoint includes container

in results by default.

Files changed:
M docs/source/searching.rst

b"diff --git a/docs/source/searching.rst b/docs/source/searching.rst\nindex 491ba8b5..d7882ed6 100644\n--- a/docs/source/searching.rst\n+++ b/docs/source/searching.rst\n@@ -8,7 +8,7 @@ Content in a Plone site can be searched for by invoking the ``/@search`` endpoin\n GET /plone/@search HTTP/1.1\n Accept: application/json\n \n-A search is **contextual** by default, i.e. it is bound to a specific collection and searches within that collection and any sub-collections.\n+A search is **contextual** by default, i.e. it is bound to a specific context (a *collection* in HTTP REST terms) and searches within that collection and any sub-collections.\n \n Since a Plone site is also a collection, we therefore have a global search (by invoking the ``/@search`` endpoint on the site root) and contextual searches (by invoking that endpoint on any other context) all using the same pattern.\n \n@@ -25,6 +25,17 @@ Search results are represented similar to collections:\n The default representation for search results is a summary that contains only the most basic information.\n In order to return specific metadata columns, see the documentation of the ``metadata_fields`` parameter below.\n \n+.. note::\n+ A search invoked on a container will by default **include that container\n+ itself** as part of the search results. This is the same behavior as displayed by\n+ ZCatalog, which is used internally.\n+ If you add the query string\n+ parameter ``depth=1`` to your search, you will only get **immediate**\n+ children of the container, and the container itself also won't be part\n+ of the results. See the Plone docs on\n+ `searching for content within a folder <https://docs.plone.org/develop/plone/searching_and_indexing/query.html#searching-for-content-within-a-folder>`_.\n+ for more details.\n+\n .. note::\n Search results results will be **batched** if the size of the\n resultset exceeds the batch size. See :doc:`/batching` for more\n"

Repository: plone.restapi


Branch: refs/heads/master
Date: 2018-09-08T20:23:51+02:00
Author: Timo Stollenwerk (tisto) <tisto@users.noreply.github.com>
Commit: https://github.com/plone/plone.restapi/commit/b42e5477fa6852b7ea98dc072489b50efaddaf1e

Merge pull request #617 from plone/docs-search-container

Docs: Add note to clarify that @search endpoint includes container in results by default.

Files changed:
M docs/source/contributing.rst
M docs/source/searching.rst

b'diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst\nindex 3634e68b..e03d24d8 100644\n--- a/docs/source/contributing.rst\n+++ b/docs/source/contributing.rst\n@@ -23,6 +23,6 @@ Include them in the documentation like this:\n :language: http\n \n \n-Build the sphinx docs locally to test the rendering by running ``make html`` in the docs folder.\n+Build the sphinx docs locally to test the rendering by running ``./bin/sphinxbuilder``.\n \n Make sure you add and commit the generated files in ``http-examples``.\n'
b"diff --git a/docs/source/searching.rst b/docs/source/searching.rst\nindex 491ba8b5..d7882ed6 100644\n--- a/docs/source/searching.rst\n+++ b/docs/source/searching.rst\n@@ -8,7 +8,7 @@ Content in a Plone site can be searched for by invoking the ``/@search`` endpoin\n GET /plone/@search HTTP/1.1\n Accept: application/json\n \n-A search is **contextual** by default, i.e. it is bound to a specific collection and searches within that collection and any sub-collections.\n+A search is **contextual** by default, i.e. it is bound to a specific context (a *collection* in HTTP REST terms) and searches within that collection and any sub-collections.\n \n Since a Plone site is also a collection, we therefore have a global search (by invoking the ``/@search`` endpoint on the site root) and contextual searches (by invoking that endpoint on any other context) all using the same pattern.\n \n@@ -25,6 +25,17 @@ Search results are represented similar to collections:\n The default representation for search results is a summary that contains only the most basic information.\n In order to return specific metadata columns, see the documentation of the ``metadata_fields`` parameter below.\n \n+.. note::\n+ A search invoked on a container will by default **include that container\n+ itself** as part of the search results. This is the same behavior as displayed by\n+ ZCatalog, which is used internally.\n+ If you add the query string\n+ parameter ``depth=1`` to your search, you will only get **immediate**\n+ children of the container, and the container itself also won't be part\n+ of the results. See the Plone docs on\n+ `searching for content within a folder <https://docs.plone.org/develop/plone/searching_and_indexing/query.html#searching-for-content-within-a-folder>`_.\n+ for more details.\n+\n .. note::\n Search results results will be **batched** if the size of the\n resultset exceeds the batch size. See :doc:`/batching` for more\n"

0 comments on commit dddd78c

Please sign in to comment.