Prompt

How do I add filters and facets to app search?

Technology / Search & Discovery Tools1 observationLast seen Oct 12, 2026

Latest observation

Oct 12, 2026OpenAI APIWeb search: off

To add filters and facets to App Search, you usually do two things:

  1. Mark fields as filterable/facetable in your schema
  2. Send those fields in the search request as filters and/or request facet counts

1) Make sure the fields are suitable

In App Search, the fields you want to filter or facet on should be mapped as the right type when you index documents.

Typical facet/filter-friendly fields are:

  • text
  • number
  • date
  • geolocation
  • enum / keyword-like fields depending on your setup

Common examples:

  • category: "Shoes"
  • brand: "Nike"
  • price: 99.99
  • created_at: "2026-10-12T00:00:00Z"

2) Add filters to a search request

Filters restrict which results are returned.

Example search with filters

{
  "query": "running shoes",
  "filters": {
    "brand": ["Nike", "Adidas"],
    "price": {
      "from": 50,
      "to": 150
    }
  }
}

This means:

  • only documents where brand is Nike or Adidas
  • and price is between 50 and 150

Filter logic

  • Multiple values in the same field are usually treated as OR
  • Different fields are usually treated as AND

3) Add facets to return counts

Facets let you show things like:

  • Brand: Nike (12), Adidas (8)
  • Category: Shoes (20), Shirts (5)

Example search with facets

{
  "query": "running shoes",
  "facets": {
    "brand": [
      {
        "type": "value",
        "size": 10
      }
    ],
    "price": [
      {
        "type": "range",
        "ranges": [
          { "from": 0, "to": 50 },
          { "from": 50, "to": 100 },
          { "from": 100, "to": 200 }
        ]
      }
    ]
  }
}

4) Combined example

{
  "query": "laptop",
  "filters": {
    "brand": ["Dell", "Lenovo"],
    "price": {
      "from": 500,
      "to": 1200
    }
  },
  "facets": {
    "brand": [
      { "type": "value", "size": 5 }
    ],
    "price": [
      {
        "type": "range",
        "ranges": [
          { "from": 0, "to": 500 },
          { "from": 500, "to": 1000 },
          { "from": 1000, "to": 1500 }
        ]
      }
    ]
  }
}

5) If you’re using the App Search API

You’d typically send this to the search endpoint for your engine.

cURL example

curl -X POST "https://YOUR-ENTERPRISE-SEARCH-HOST/api/as/v1/engines/YOUR_ENGINE/search" \
  -H "Authorization: Bearer private-YOUR_PRIVATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "laptop",
    "filters": {
      "brand": ["Dell", "Lenovo"]
    },
    "facets": {
      "brand": [{ "type": "value", "size": 5 }]
    }
  }'

6) UI-side usage

In your app:

  • let users select filters from checkboxes, dropdowns, sliders
  • convert those selections into the filters object
  • render facet counts returned by the API

If you want, I can also show you:

  • the exact App Search JSON syntax for nested filters/facets,
  • examples in JavaScript / React,
  • or how to do this in Elastic Enterprise Search App Search vs Elasticsearch.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.