algolia / firestore-algolia-search

Apache License 2.0
112 stars 35 forks source link

Allow transform to skip records #69

Closed Ehesp closed 3 years ago

Ehesp commented 3 years ago

Current the transform function returns the json payload from the transform endpoint.

Currently it seems that in order to skip a record it'd be best to throw on the callable function, however this would create a false positive log. Instead, is it worth returning an empty object and checking this on the response? Happy to make a PR if so.

smomin commented 3 years ago

Hello Ehesp,

Can you provide details on the skip record? There was a previous issue related to a developer wanted to prevent a record from being indexed, but they were able to use Algolia Filters to solve the issue.

Sajid

Ehesp commented 3 years ago

Thanks, I've applied the filter and it's working client side now:

<Configure facetFilters={[["metadata.type:swag"]]} />

It would still be good though to have a way to totally skip a record being stored via the transformer, although I guess that's more of an extension decision.

smomin commented 3 years ago

I am going to close this ticket.