Can I search by data content?

Hello,

If I have a document like this:

{
  "results": [
    {
      "data": {
        "settings": [
          {
            "color": "red"
          }
        ]
      }
  ]
}

How I can retrieve all the documents that have results.data.settings.color equal to "red" ?

Hi @mohamed

Welcome to the Prismic community and thanks for reaching out to us.

It's not possible to retrieve documents the way you are doing. You can retrieve documents that have a specific by using predicates with Custom Types and fields If the document has a field name as "color," which is uniquely present in documents.

Find more details about predicates here:

Let me know if you have any further questions.

Thanks,
Priyanka

I can't mark the issue as solved, because the Prismic API it doesn't allow us to filter by any field.

Thanks for your time anyway.

Hello @mohamed

There are a number of fields that you can query your content. Have you looked into the Query by Field article?

Thanks,
Priyanka

Yes, I looked on that list, but there isn't the field that I want to use.

The field that I want to use search is IntegratedFields.

Hello @mohamed

Unfortunately, you can not search the data content by Integration Field. I will make this a feature request for the future improvement and pass it to the @features-team.

Thanks,
Priyanka

@mohamed We already discussed this feature and created a feature request.

Can you query by a custom integration field id? Technologies

Ok, I will follow that thread too.