Inicio - Documentación - POM Theme - 07 Faceted search - Create a filterable listing

Create a filterable listing

This tutorial builds a complete search page with multiple filters, result cards, selections, sorting, and pagination.

Context list and indexing actions

Filterable listing assembled in the Page Builder

Plan the listing

Write down:

  • the archive or custom query that owns the candidates;
  • the two or three attributes visitors use most;
  • whether combinations inside each facet should match any value (OR) or every value (AND);
  • the fields required by the result card;
  • whether results should refresh automatically or wait for a submit button.

Avoid adding a filter merely because a field exists. Each facet should represent a useful choice that is consistently populated.

Configure indexed content

  1. Open Settings → POM Theme → Content model → Faceted search.
  2. Select Edit facets for the intended context.
  3. Under Indexed native fields, keep only the payloads used by the result template: Index featured image payload, Index derived excerpt, and/or Index post content.
  4. Under Indexed metas, select Add indexed meta for every custom field displayed by the card.
  5. Enable Gallery only for gallery-valued metas.

Add the facets

For each planned filter:

  1. Select Add facet.
  2. Enter its visible Label.
  3. Choose the Type that fits the number and structure of choices.
  4. Choose the correct source type and key.
  5. Set Operator and Selection mode.
  6. Decide how Zero-count choices should behave.
  7. Keep Counts on when counts help visitors predict the result.
  8. Keep Enabled active.

Only one Search facet is allowed in a context. It has no separate source because it searches the context’s indexed search content.

Select Save facets, return to the list, and run Reindex context.

Build the interface

  1. Add each Faceted Search Facet with its copied Facet ID.
  2. Add Faceted Search Selections so visitors can remove active choices.
  3. Add Faceted Search Counts.
  4. Add Listings (Feed) and set Use with faceted search? to Yes.
  5. Match its query configuration to the context.
  6. Add Faceted Search Sort if ordering choices are useful.
  7. Add Faceted Search Per Page only when visitors benefit from controlling page size.
  8. Add one Faceted Search Pager.
  9. Add Faceted Search Reset.
  10. If Facet submit mode is Manual, add Faceted Search Submit with the context ID.

Do not enable the ordinary Listings (Feed) pagination controls for this result instance. Paging belongs to Faceted Search Pager.

Acceptance check

Test every facet alone, one cross-facet combination, the zero-result state, reset, sort, pager, back/forward browser navigation, a copied filtered URL, keyboard operation, and the narrowest supported viewport.

Use Results and controls for control details and Troubleshooting when the complete page does not stay synchronized.