From 4f3378e5b06d025edf871aab6d217aa612ff9322 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Tue, 30 Jun 2020 11:21:51 +0100 Subject: [PATCH] update search docs (#1503) --- docs/features/search-results.md | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docs/features/search-results.md b/docs/features/search-results.md index 7e9faf25c2..50968408ed 100644 --- a/docs/features/search-results.md +++ b/docs/features/search-results.md @@ -52,3 +52,46 @@ in the Content Application when using **Search Input** component. > **Partial** support means the feature supports basic scenarios > and there are edge cases that are not yet fully tested and might not work. + +## Search Queries and Precise Searching + +You can customize the queries to get better results. + +Given that, no colon ":" suffixes the term, then the default query is constructed for text searches. The default query is: + +```text +(cm:name:"[term]*" OR cm:title:"[term]*" OR cm:description:"[term]*" OR TEXT:"[term]*" OR TAG:"[term]*") +``` + +Note that compared to Share the following defaults are removed from ACA: + +```text +OR ia:whatEvent:"[term]*" OR ia:descriptionEvent:"[term]*" OR lnk:title:"[term]*" OR lnk:description:"[term]*" +``` + +### Key facts + +If you have entered more than one word into the search input box, then the search query is constructed automatically using an `AND` operation. + +I you have entered more than one word encapsulated in quotation marks, then the search query is constructed treated everything as a single string. + +If you have entered more than one word separated by `AND`, then the search query is constructed using an `AND` conjunction. + +If you have entered more than one word separated by `OR`, then the search query is constructed using an `OR` disjunction. + +If you have entered an `=` symbol before the search term, then the search query is constructed using exact term matching. + +### Examples + +| Search Type | Search input | Expected result | +| --- | --- | --- | +| Single Term | banana | Nodes that contain the term **banana** in any content | +| Conjunction | big yellow banana | Nodes that contain all of the terms **big**, **yellow**, and **banana** | +| Phrase | "big yellow banana" | Nodes that contain all of the terms **big**, **yellow**, and **banana** | +| Conjunction | big AND yellow AND banana | Nodes that contain all of the terms **big**, **yellow**, and **banana** | +| Disjunction | orange OR banana OR apple | Nodes that contain at least one of the terms **orange**, **banana** or **apple** | +| Exact term | =orange | Nodes that contain the exact term **orange** in any content | + +## See also + +