Field v/s Facet

Fields are the core data points stored in the HawkSearch index. Each field corresponds directly to an attribute of a data item and holds the actual data used for searching and indexing. Fields also define how HawkSearch processes and indexes these attributes. Because fields are foundational to the index, they are rarely removed, and any changes to a field typically require a full index rebuild. Field also defines how Hawksearch should index the attribute (ref. Field Configuration: Best Practices - Field Types).

Facets, on the other hand, are the visible filters users interact with on search results and landing pages. Often referred to as guided navigation, refinements, or dimensions, facets represent aggregated views of search results based on underlying fields. While fields store the data, facets provide a user-facing way to explore and narrow down results.

Facets are created based on the fields. One facet can be created based out of one field. Facet is the visual representation of the field’s aggregation. This means that the users interact with the facets on the search results page and landing pages.

  • The end users see the facets on their search and landing pages but not the fields.
  • Making field changes usually requires a full index rebuild but making changes to facet (except creation) doesn’t need indexing.
  • Facet changes involve settings cache to be rebuilt which is by default 12.15 minutes (729 seconds)
  • There cannot be two facets for the same field.
  • You do not need to create a facet for every field you have defined. Facet is required only if there is a need to show the filters.
  • Facets are virtual i.e., deleting facet won’t delete the data however deleting the field will.
  • Facets are created based out of fields. The exception is those facets whose FacetFieldType is set to search - they can exist without the need of any fields being created.
  • Changing the facet’s Display Type (e.g., from CheckboxList to LinkList) or any other changes to the facet do not affect the field or the underlying data but changing the field type can influence facet display (ref)