Skip to content
Snippets Groups Projects
Commit 037548f2 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Improve documentation

JIRA INFRA-575
parent bdc85930
No related branches found
No related tags found
No related merge requests found
docs/_static/inventory/search_juniper_and_rats.png

184 KiB

docs/_static/inventory/search_juniper_not_rats.png

505 KiB | W: | H:

docs/_static/inventory/search_juniper_not_rats.png

184 KiB | W: | H:

docs/_static/inventory/search_juniper_not_rats.png
docs/_static/inventory/search_juniper_not_rats.png
docs/_static/inventory/search_juniper_not_rats.png
docs/_static/inventory/search_juniper_not_rats.png
  • 2-up
  • Swipe
  • Onion skin
docs/_static/inventory/search_wildcard.png

247 KiB

......@@ -19,13 +19,15 @@ The *items* page of the inventory lists all existing items.
.. image:: _static/inventory.png
.. _inventory-search:
Search
------
You can find a specific item or group of items by using the search box.
Elasticsearch is used as the full-text search engine and allows to use a query string “mini-language”.
- To perform a free text search, simply enter a text string. For example, if you’re looking for Juniper devices, enter ``juniper``. Note that the search is case insensitive.
- To perform a free text search, simply enter a text string. For example, if you’re looking for Juniper devices, enter ``juniper``. Notice that the search is case insensitive.
.. image:: _static/inventory/search_juniper.png
......@@ -39,15 +41,25 @@ Elasticsearch is used as the full-text search engine and allows to use a query s
.. image:: _static/inventory/search_ics_id_field.png
- By default, all terms are optional, as long as one term matches. A search for ``foo bar baz`` will find any document that contains one or more of foo or bar or baz. Boolean operators can be used to provide more control. The preferred operators are + (this term must be present) and - (this term must not be present). For example to search all juniper devices not at RATS: ``juniper -RATS``
- By default, all terms are optional, as long as one term matches. A search for ``foo bar baz`` will find any document that contains one or more of foo or bar or baz. Boolean operators can be used to provide more control. The preferred operators are ``+`` (this term must be present) and ``-`` (this term must not be present). For example to search all juniper devices not at RATS: ``juniper -location:rats``
.. image:: _static/inventory/search_juniper_not_rats.png
- You can also use the familiar boolean operators ``AND``, ``OR`` and ``NOT`` (also written ``&&``, ``||`` and ``!``). Here is how to search all juniper devices that are at RATS: ``juniper AND location:rats``
.. image:: _static/inventory/search_juniper_and_rats.png
- Wildcard searches can be run using ``?`` to replace a single character and ``*`` to replace zero or more characters: ``AAA10?``
Be aware that wildcard queries can use an enormous amount of memory and perform very badly — just think how many terms need to be queried to match the query string ``"a* b* c*"``.
.. image:: _static/inventory/search_wildcard.png
- You can search items where a field has any non-null value. To get items with a parent: ``_exists_:parent``
.. image:: _static/inventory/search_exists_parent.png
- To search a string that includes reserved characters (+ - = && || > < ! ( ) { } [ ] ^ " ~ * ? : \ /), you have to use double quotes. Here is how to search for an old JIRA TAG ``"TAG-250"`` or mac adress ``"7c:e2:ca:64:dd:61"``.
- To search a string that includes reserved characters ``+ - = && || > < ! ( ) { } [ ] ^ " ~ * ? : \ /``, you have to use double quotes. Here is how to search for an old JIRA TAG ``"TAG-250"`` or mac adress ``"7c:e2:ca:64:dd:61"``.
.. image:: _static/inventory/search_quote_tag.png
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment