I'm trying to query Prismic predicate.fulltext using Vuejs This is my first time using predicates, but the documentation on what is required for full-text predicates seems confusing. Here is my code.
async searchByQuery(query) { const fullTextResult = await this.$prismic.client.get({ predicates: this.$prismic.predicate.not("articles.article_title", query), }); console.log(fullTextResult); },
Where articles is my custom type, article_title is a field in my custom type. This is what I understand from the documentation on how to do this, but then I get an unexpected error
I'd like to clarify why this doesn't work and what the documentation really means. BTW, I'm using Vue3, which means I'm using the newer prismicio/client
You're so close!
With Vue 3, you would see something similar:
Basically you need to prefix
Please tell me if this helps :)
my.
to indicate that it is a field of one of your document types and change the predicate you use forprecidate.fulltext
instead ofpredicate.not
(assuming you want to run a full text search)