Page tree
Skip to end of metadata
Go to start of metadata

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

Step-by-step Add Facet Component

  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

  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

  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.