This article explains how to use our Web App to search through your content.* As you can search in many locations, and in a few different ways, we’ll cover searching for content (C), media (M) and content models (CM).
* If you want to find search documentation for the API, read our Documentation pages.
Contents:
Start by typing a keyphrase in the search input to search through all of the text fields (short and long) within your entry:
Some notes:
When you want to search within a specific Content Type, use the dropdown menu to the left of the search input field and select one of the available content types.
If searching with a keyphrase is not enough, you can press the down arrow to get a list of all the options at hand. When using the contextual dropdown menu, you can select some predefined values if they are available. Select, or press enter on, any of these and you’ll see the following:
true
or "no" for false
.When it comes to evaluating or comparing values, there is a set of operators you can use:
Content types | : | <= | < | >= | > | == | yes | no |
---|---|---|---|---|---|---|---|---|
Text (short / Long) | Supported | x | x | x | x | x | x | x |
Number (integer / Decimal) | x | Supported | Supported | Supported | Supported | Supported | x | x |
Date and time | x | Supported | Supported | Supported | Supported | Supported | x | x |
Boolean | x | x | x | x | x | x | Supported | Supported |
Image Dimension | x | Supported | Supported | Supported | Supported | Supported | x | x |
Cell | x | Supported | Supported | Supported | Supported | Supported | x | x |
Let's say you have a collection of blog posts that belong to a certain category. If you want to find all of the posts in that category, then you need to search for them using a specific reference. To do this, you need to provide the ID value of the category.
To find the ID value, go to the “Info panel” of the entry:
Not to be confused with the "Filter by reference values" search option, "search for reference" is a search alternative that only shows up in the entry editor when you have fields with a reference type and you want to find an entry to link to.
For example, when you want to find and assign a category to a blog post.
Here, some options such as filtering by content type are not available as the amount and type of content you can search in is set in the field validation tab, under the Content model section.
Assets can additionally be searched by certain meta data types. These types are:
Depending on the field type (like Text or Number), you can use the operators mentioned above to configure your search.
You can combine multiple filters and create complex queries—such as searching for only published items that were published after a specific date.
To do that, you can connect the separate queries with an ampersand character (&), like so: status : changed & createdAt < 2017-03-25
.
Currently, if you just type in a keyphrase it will search through all of the text fields in the entry. However, if you prefix the keyphrase with a specific field name (for example, name : John
) then you need to include the entire value (name : John Doe
).
author
- why is it not searchable?That's because author
is a reserved word. The full list of reserved words reads:
id
author
status
updatedAt
createdAt
publishedAt
firstPublishedAt
While it's possible to name fields using reserved words, such fields are not searchable.
You need to perform an exact search and this is possible only if you search in field type “Short text” (you can do this in the Content model section, look at the image below).
Then when you're making a search in this field, wrap your query in quotes—such as, title : "Entry 1"
.
–
Have more questions or comments? Feel free to reach out by sending an email to support@contentful.com.