update search docs (#1503)

This commit is contained in:
Denys Vuika 2020-06-30 11:21:51 +01:00 committed by GitHub
parent 2d6c058989
commit 4f3378e5b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
<https://issues.alfresco.com/jira/browse/ACA-2219>