| 25 | * Choose whether you want to search objects or folders. In the upper left corner of the search editor tab, there are two radio buttons. The left button sets the search object for objects, and the right button for folders. |
| 26 | |
| 27 | [[Image(wiki:Public/Docs/CinnamonUsingAdvancedSearch:SearchObjectFolder.png)]] |
| 28 | |
| 29 | * Select the desired version behaviour of the search, using the three radio buttons to the right ob the object / folder selector. The. control is only relevant for objects, since folders have no versions. Please note that only those versions are returned that actually fulfill the search definition. There might be more versions that are not returned, because they do not fulfill the search criteria. |
| 30 | * The left button sets the search to return the newest version in the main branch. |
| 31 | * The mid button sets the search to return the end versions of all branches. |
| 32 | * The right button sets the search to return all versions. |
| 33 | |
| 34 | [[Image(wiki:Public/Docs/CinnamonUsingAdvancedSearch:SearchVersions.png)]] |
| 35 | |
26 | | * When you are done defining your search |
| 41 | === A simple example: searching for objects with a certain name |
| 42 | * Right-click into the search definition space and select //Add term//. A green flag with //Name equals// next to it appears in the space. |
| 43 | * Click on the line you just created. In the right portion of the editor, some controls will appear. The field name is already preset with the default field, //Name//. |
| 44 | * Into the red text box, type your search string. The background color turns from red to white. A red background indicates an invalid (in this case: empty) search string. For other fields, administrators can also define more complex rules for valid search string syntax, using [https://en.wikipedia.org/wiki/Regular_expression Regular Expressions]. |
| 45 | * In the combo box above the search string field, choose the desired comparison operator: |
| 46 | * //equals// matches fields that are exactly the string you specified. |
| 47 | * //starts with// matches fields that begin with the string you specified, but may have further trailing characters. |
| 48 | * //contains// matches fields that contain the string you specified, but may have leading and / or trailing characters. |
| 49 | > **NOTE:** The following rules apply: |
| 50 | * Search is case-insensitive, it does not matter whether you use upper- oder lower-case characters, you will always get the same result. |
| 51 | * Using //contains// significantly reduced search performance, due to the way the index works. |
| 52 | * Multi-value fields like //content// match when any of the field's tokens (words) match. |