FacetSearch FacetSearch

yaml
type: "io.kestra.plugin.meilisearch.FacetSearch"

FacetSearch

Perform a facet search from a Meilisearch DB. WARNING: make sure to set the filterable attributes before.

Examples

Sample facet search

yaml
id: "facet_search"
type: "io.kestra.plugin.meilisearch.FacetSearch"
id: meilisearch-facet-search-flow
namespace: company.team

variables:
  index: movies
  facetQuery: fiction
  facetName: genre
  host: http://172.18.0.3:7700/

tasks:
  - id: facet_search_documents
    type: io.kestra.plugin.meilisearch.FacetSearch
    index: {{ vars.index }}
    facetQuery: {{ vars.facetQuery }}
    facetName: {{ vars.facetName }}
    filters:
      - "rating > 3"
    url: "{{ vars.host }}"
    key: "MASTER_KEY"

  - id: to_json
    type: io.kestra.plugin.serdes.json.IonToJson
    from: "{{ outputs.search_documents.uri }}"

Properties

facetName

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Facet name

Name of the facet you wan to perform a search on (ex: facetName: "genre" on a film collection)

index

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Index

Index of the collection you want to search in

key

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Meilisearch connection key.

url

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Meilisearch connection URL.

facetQuery

  • Type: string
  • Dynamic: ✔️
  • Required:
  • Default: ``

Facet query

Query that will be used on the specified facetName

filters

  • Type: array
  • SubType: string
  • Dynamic: ✔️
  • Required:
  • Default: []

Filters

Additional filters to apply to your facet search

Outputs

totalHits

  • Type: integer
  • Required:

Hits number

Number of items hit by the facet search request

uri

  • Type: string
  • Required:
  • Format: uri

URI to output

Results URI to an Amazon .ion file

Definitions

Was this page helpful?