diff options
-rw-r--r-- | docs/fr/source/interface-utilisateur.rst | 19 | ||||
-rw-r--r-- | ishtar_common/templates/widgets/search_input.html | 12 |
2 files changed, 27 insertions, 4 deletions
diff --git a/docs/fr/source/interface-utilisateur.rst b/docs/fr/source/interface-utilisateur.rst index 05aab0e93..c598b64bf 100644 --- a/docs/fr/source/interface-utilisateur.rst +++ b/docs/fr/source/interface-utilisateur.rst @@ -120,8 +120,6 @@ Préfixer un terme par un « moins » : « ``-`` » permet d'exclure des ter **Exemple** : une recherche avec « ``ancre -amphore`` » permet d'obtenir la liste des ancres en excluant les lots de mobilier comprenant des amphores. -.. - TODO: Une recherche avec l'opérateur OU... pour l'instant cette recherche pose trop de problèmes Recherche par critère --------------------- @@ -162,6 +160,23 @@ Pour des recherches de type plus grand, plus petit (pour les champs de type numà **Exemple** : la recherche « ``annee=>"2019"`` » permet d'obtenir tous les éléments de 2019 et après. + +Opérateur OU +++++++++++++ + +Un opérateur OU est disponible afin de faire une recherche incluant, par exemple, des critères différents. Cet opérateur utilise la notation «`` || ``». + +**Exemple** : la recherche « ``materiau="Métal" || type-objet="lingot" `` » incluera dans la recherche tout le mobilier métallique ainsi que tout le mobilier dont le type d'objet est lingot. + +Opérateur ET +++++++++++++ + +Un opérateur ET est disponible notamment afin de faire une recherche sur un même critère avec plusieurs valeurs. Cet opérateur utilise la notation «`` && ``». + +**Exemple** : la recherche « ``materiau="Métal" && matériau="Bois" `` » n'incluera dans la recherche que le mobilier qui a pour matériau métal et bois. + +.. warning:: Les opérateurs «`` && ``» et «`` || ``» ne fonctionnent que s'ils sont bien entourés d'espaces. + .. _bookmarks: Marques-pages et alertes diff --git a/ishtar_common/templates/widgets/search_input.html b/ishtar_common/templates/widgets/search_input.html index 832cfc20c..e6808833e 100644 --- a/ishtar_common/templates/widgets/search_input.html +++ b/ishtar_common/templates/widgets/search_input.html @@ -80,8 +80,16 @@ <p><em>{% blocktrans %}Example: "material='*'" will return only all items with a material set, "-material='*'" return all items with material not set.{% endblocktrans %}</em></p> <h4>{% trans "Greater than, lower than, before, after" %}</h4> - <p>{% blocktrans %}For searches such as larger, smaller (for numeric fields), before, after (for date fields), add the criterion from the form, then change the "=" sign to "=>" or "=<", depending on the desired result.{% endblocktrans %}</p> - <p><em>{% blocktrans %}Example: the search 'year=>"2019"' will return all items from 2019 and onwards.{% endblocktrans %}</em></p> + <p>{% blocktrans %}For searches such as larger, smaller (for numeric fields), before, after (for date fields), add the criterion from the form, then change the "=" sign to "=>" or "=<", depending on the desired result.{% endblocktrans %}</p> + <p><em>{% blocktrans %}Example: the search "year=>'2019'" will return all items from 2019 and onwards.{% endblocktrans %}</em></p> + + <h4>{% trans "OR operator" %}</h4> + <p>{% blocktrans %}An OR operator is available for searches that include, for example, different criteria. This operator uses the notation " || ".{% endblocktrans %}</p> + <p><em>{% blocktrans %}Example: the search "material='Metal' || object-type='ingot'" will include in the search all metallic finds as well as all finds whose object type is ingot.{% endblocktrans %}</em></p> + + <h4>{% trans "AND operator" %}</h4> + <p>{% blocktrans %}An AND operator is available to search on the same criterion with several values. This operator uses the notation " && ".{% endblocktrans %}</p> + <p><em>{% blocktrans %}Example: the search "material='Metal' && material='wood'" will only include finds made of metal <strong>and</strong> wood.{% endblocktrans %}</em></p> <p class="text-center"><em><a href="https://ishtar.readthedocs.io/fr/{{widget.ISHTAR_DOCUMENT_VERSION}}/interface-utilisateur.html#barre-de-recherche" target="_blank">{% trans "Full documentation for searches." %}</a></em></p> |