Here you can find the steps necessary to add a new dynamic facet to the framework

Step-by-step Add Facet Component

Add the steps involved:

  1. Create a class file type in ui/src/app/facet_framework/types
  2. Extend class from BaseFacet
  3. Add logic and overwrites as seen fit
  4. Add the new type to the FieldTypes in ui/src/app/field_framework/types/dynamic-field.ts
  5. Add type constructor to ui/src/app/field_framework/types/field-factory.ts

Step-by-step Add Facet Type

Add the steps involved:

  1. Go to ui/src/app/facet_framework/components
  2. In console execute ng generate component <component-name>
  3. Extend the component from AbstractFacet
  4. Modify the new component as seen fit
  5. Go to ui/src/app/facet_framework/directive/facet-generator.directive.ts
  6. Add the component implementation

Step-by-step Implement Facet & Filter

Add the steps involved:

  1. Go to ui/src/app/facet_framework/filter.service.ts
  2. Add logic to send the filter, normally it would be on buildSearchQueryFacets
  3. Go to server/qpl-elastic/elasticPayloadBuilder.js
  4. Add the new facet query in buildQueryAggregation
  5. Add the new filter in buildQueryFilter


Facet query and filter only implement in Elasticsearch for the moment

These are the basic steps to add a new facet, more complex facets, may required assistance from the development team.

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

Related issues