You can use the Contentful web app to search within your content. To search via the Content Delivery API, see its Search parameters. Because you can search content from multiple locations, and in a few different ways, the information that follows covers searching for content entries (C), media assets (M), and content types within content models (CM).
To search through all of the (short and long) text fields within your entry, type a keyphrase in the search field:
A search is case-insensitive. Search happens automatically and dynamically; you do not have to press Enter. Keep in mind that when you use
IS operator, you will get exact results; when you use
MATCHES, you get fuzzy search results.
To reduce the number of keyphrase search results, increase the number of filters. Select the down arrow to get a list of all of the options, or start typing the name of a desired filter to easily access it.
The operators that are supported by specific field types are listed as follows:
|Field type||Equality operator ||Inequality operator ||Match operator (fuzzy search) ||Range ||Range ||Range ||Range |
|Short text – list||Yes||Yes|
|Short text – list with predefined values||Yes||Yes|
|Number – integer||Yes||Yes||Yes||Yes||Yes||Yes|
|Number – decimal||Yes||Yes||Yes||Yes||Yes||Yes|
|Media – one file||Yes||Yes|
|Media – many files||Yes|
|Reference - one||Yes||Yes|
|Reference - many||Yes|
A reference is a link between two entries. Imagine you are working with a blog, where a blog post entry reference a category entry. To find all of the posts that belong to a specific category, search for this category in the reference field. First, select the reference field in the search filter and then locate the right category entry in the modal box.
Alternatively, if you already know the ID for the category entry, paste it in the category filter and perform a search.
Working with media assets often requires you to match images of a specific type or size. There is an additional set of filters that can be used in image search:
When working with these filters, you can use the same operators as in numerical and text fields listed above.