I have a common field ID on all document types, "category". It is a select type field. How can I query all of my documents where that field value is equal to "Interview".
Hey Stefan, welcome to the Prismic community forum!
What you’re stating is correct. That query does an && comparison rather than ||, I added a task in the backlog to make this clearer in our documentation.
You can try and use the Fulltext search instead. This way you can specify exactly what you’re looking for. e.g:
But then that presents another problem: We end up returning documents where other fields include the word “inverviews”. Is there no way to specify the query for a particular field ID?
You are right, the fulltext search will find coincidences in all following fields: Rich Text, Title, Key Text, UID and Select.
In this case, the first option using the at predicate will be the best one, but, you have to consider that this call searches for results only in the specified custom type.
Another option I can recommend you if you need to be able to do a partial search in your proejct is to use a third party search service such as Algolia.
Pau
closed , flag & select 'Something Else' to reopen.
5