Skip to content

Commit

Permalink
update search docs (#1503)
Browse files Browse the repository at this point in the history
  • Loading branch information
Denys Vuika authored Jun 30, 2020
1 parent 2d6c058 commit 4f3378e
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions docs/features/search-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 4f3378e

Please sign in to comment.