1.  [](/)
2.  [Templates](/templates)
3.  Filtered Attribute Search

Back to Templates

Semantic Search

# Filtered Attribute Search

## Semantic search with attribute filtering and custom sorting. Perfect for e-commerce where users filter by price, category, or date.

3 stages

[Read Docs](https://mixpeek.com/docs/retrieval/retrievers)

[Integrate Now](/start)

Use in Studio

No credit card to start · Build from $25/mo

OverviewAPIRelated

### Pipeline Stages

1

semantic\_search

filter

`feature_search`

View parameters

{
  "searches": \[
    {
      "feature\_uri": "mixpeek://multimodal\_extractor@v1/vertex\_multimodal\_embedding",
      "query": {
        "input\_mode": "text",
        "value": "{{INPUT.query}}"
      },
      "top\_k": 100
    }
  \],
  "final\_top\_k": 50
}

2

attribute\_filter

filter

`attribute_filter`

View parameters

{
  "field": "{{INPUT.filter\_field}}",
  "operator": "eq",
  "value": "{{INPUT.category}}"
}

3

sort\_by\_attribute

sort

`sort_attribute`

View parameters

{
  "field": "{{INPUT.sort\_field}}",
  "order": "{{INPUT.sort\_order}}"
}

### Input Schema

`query`

text

required

Search query

`category`

string

Category to filter by

`filter_field`

string

Document field to filter on, as the collection's schema names it (e.g., category, or metadata.category for a field inside a metadata object)

`sort_field`

string

Field to sort by (e.g., price)

`sort_order`

string

Sort order (asc or desc)

#### Use Cases

*   E-commerce product filtering
*   Catalog search with facets
*   Price/date sorted results
*   Category-based filtering

#### Requirements

*   Collection must have the filterable attributes indexed

#### Tags

filtering

sorting

attributes

ecommerce

#### Ready to use this template?

Clone it into your namespace and start querying in minutes.

Use in Studio