Fulltext Search

You can use the Fulltext predicate to search a document for a given term or terms.

Before reading

This page assumes that you're using the Vue.js starter project or that you have setup your project as explained on the Integrating with existing project page.

The fulltext predicate searches the term in the following fields:

  • Rich Text
  • Title
  • Key Text
  • UID
  • Select Fields.

To learn more about this predicate checkout the Fulltext section on the Query Predicate Reference page.

Note that the fulltext search is not case sensitive.

Example Query

The following example shows how to query all the documents of the custom type "blog_post" that contain the word "prismic".

Copy
this.$prismic.client.query([
  this.$prismic.Predicates.at('document.type', 'blog_post'),
  this.$prismic.Predicates.fulltext('document', 'prismic')
]).then((response) => {
  // response is the response object, response.results holds the documents
});