SearchForFacetValues in Javascript with Snippets

I’m using the Javascript Algoliasearch package and trying to search within one facet value with snippets. My function looks like this but the last two query params seem to have no affect at all on the results. I want it to only search one facet and return back the snippet (2 words).

index
  .searchForFacetValues({
    facetName: 'title',
    facetQuery: 'search term',
    maxValuesPerFacet: '7',
    attributesToSnippet: [
    'title:2'
  ]
  })

Does snippets work with searchForFacetValues? The reason for using searchForFacetValues is because I have 4 different searchable attributes (used in other places), but for this one particular search and function call, I need to search only one attribute.

Hi @cindy, here’s your call with the right parameters:

index
 .searchForFacetValues({
   facetName: 'title',
   facetQuery: 'search term',
   maxFacetHits: 7, // instead of maxValuesPerFacet
  // attributesToSnippet does not applies to searchForFacetValues since searchForFacetValues searches in a single attribute, for values
 })

Can you walk me through your use case that requires the use of searchForFacetValues along with attributesToSnippet? If you are building a UI for example, let me know what the UI would look like. Thanks