# Search Facet

> Text input facet for standard query, meta, taxonomy, date, ACF relationship, and query bundle searches.

<!-- Sources: src/Components/Facets/SearchFacet/SearchFacet.php; src/Facets/FacetBlockInterceptor.php; client/src/domains/facets/adapters/search-facet-adapter.ts; client/src/domains/facets/service/facet-query-mappings.ts; tests/e2e/components/facets/search-facet.spec.ts; tests/e2e/components/facets/wp-query-args.spec.ts -->

# Search Facet

`Search Facet` renders a search input. Unlike option facets, it sends the typed value from the input instead of an authored option value.

## Props

| Group | Prop | Default | Meaning |
| --- | --- | --- | --- |
| Settings | `target` | empty | Shared target ID. |
| Settings | `placeholder` | `Search...` | Input placeholder. |
| Settings | `argument_mode` | `default` | Single argument mode when multi-argument search is disabled. |
| Settings | `target_multiple_query_arguments` | `false` | Renders a `query_bundle` search input when enabled. |
| Settings | `query_argument_relation` | `AND` | Relation for multi-argument search mappings. |
| Default Query Argument | `facet_key` | `search` | Query argument for default mode. |
| Meta Argument | `meta_key`, `meta_compare`, `meta_type` | ``, `LIKE`, `char` | Meta query settings. |
| Taxonomy Argument | `taxonomy`, `tax_field` | ``, `slug` | Taxonomy search settings. |
| Date Argument | `column` | `post_date` | Date query column. |
| ACF Relationship Argument | `meta_key` | empty | Relationship field stored on filtered posts. |
| Query Argument Mappings | `mapping_key`, mode-specific props | empty | Multi-argument search rows. |
| Styling | `class` | `ome-search-facet-default` | Input class. |

## Default Query Keys

Search Facet supports filter-focused keys:

```text
search, p, title_like, name_like, post_type, category_name_like, tag_like, author, author_name_like, year, monthnum
```

Use Search Facet for text input and partial matching. Use an option facet when users should choose from known values.

## Multi-Argument Search

When `target_multiple_query_arguments` is true, the rendered input type is `query_bundle`. The typed value is copied into every row in `query_argument_mappings`.

```text
target_multiple_query_arguments = true
query_argument_relation = OR
query_argument_mappings:
- native-search -> default search
- priority -> meta facet_priority LIKE char
```

This makes one input search across native search and a meta field.

## ACF Relationship Search

ACF relationship mode expects numeric related post IDs. It filters the relationship field stored on the posts being filtered.
