Contentstack’s Advanced Search feature is accessible from the search bar located in the header of our app. To do an advanced search using conditions within your Contentstack app, you can perform the following steps:
- Search entries or assets
In the Search bar (press “K”), first, select if you want to search for entries or assets.
- Select content type
If you choose entries, you will see a Content Type selector. You can use a specific content type to refine your search.
- Choose Condition
To select a condition, type “;” (semicolon). You will see two options Match All and Match Any. Select the option that suits your requirements the best.
- Enter your search queries
A search query contains a field, an operator, and the expected value.
Here is an example:
First, select a field (such as Title), then use an operator (such as Matches), and then enter the value that you are looking for (such as Home).
The field drop-down lets you select only system-defined fields here, such as Created at, Created by.
Once you select a field, the next drop-down option lets you select a conditional operator (such as contains, greater than, matches). The values that you can select here depend on the data type of the field that you have chosen.
For example, if you select Title (which is of ‘string’ data type), you will be able to see operators that support string data type (for example, ‘matches’, ‘contains’). We have covered more about this in the latter section.
To add multiple search queries, click the + link, and enter your query as explained above.
Note: All the conditions or queries that you add on the same level will work with either ‘ALL’ or ‘ANY’ operator, not a mix of both.
- Add nested conditions
Nested conditions help you build really complex queries to further refine your search.
To add a nested condition, click the + link. You will see a nested block, within which you can select the ‘ALL’ or ‘ANY’ operator.