From cc92d7cc2cf35ed791d29879b2aed5b08e6bf4e0 Mon Sep 17 00:00:00 2001 From: gengchc2 Date: Thu, 29 Nov 2018 20:44:41 -0800 Subject: [PATCH] Add the describes about search option Change-Id: I535adec38fe9d3d72bb6001c54c321613de2e280 --- doc/source/cli/details.rst | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/doc/source/cli/details.rst b/doc/source/cli/details.rst index c3112a7..dd095de 100644 --- a/doc/source/cli/details.rst +++ b/doc/source/cli/details.rst @@ -186,7 +186,24 @@ List all actions for your user ``--offset OFFSET`` ``--search SEARCH`` - Define a filter for the query + Define a filter for the query. + + If the storage of freezer-api is a ``Sqlalchemy`` database, the search option + must be a list of {key, value}, and it can be converted to json, + otherwise, search option will not work, querying all records. as follows: + * '[{"max_retries": 10}]' + * '[{"max_retries": 10}, {"mode": "nova"}]' + ``Note``: + If all key-values of the list are found in this tuple, it will be + filtered in, otherwise filtered out. + + If the storage of freezer-api is an ``elasticsearch`` database, the search + option can be the same as above, or it can be a string that it isn't + {key, value}. plsease reference elasticsearch https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html + as follows: + * '[{"max_retries": 10}]' + * '[{"max_retries": 10}, {"mode": "nova"}]' + * '["5e37946b10dc42dbb6ca3338501da2c7"]' .. _freezer_action-show: @@ -283,7 +300,7 @@ List all backups for your user ``--offset OFFSET`` ``--search SEARCH`` - Define a filter for the query + Define a filter for the query. See ``freezer action-list`` .. _freezer_backup-show: @@ -356,7 +373,7 @@ List of clients registered in the api ``--offset OFFSET`` ``--search SEARCH`` - Define a filter for the query + Define a filter for the query. See ``freezer action-list`` .. _freezer_client-register: @@ -516,7 +533,7 @@ List all the jobs for your user ``--offset OFFSET`` ``--search SEARCH`` - Define a filter for the query + Define a filter for the query. See ``freezer action-list`` ``--client CLIENT_ID, -C`` CLIENT_ID @@ -701,7 +718,7 @@ List all the sessions for your user ``--offset OFFSET`` ``--search SEARCH`` - Define a filter for the query + Define a filter for the query. See ``freezer action-list`` .. _freezer_session-remove-job: