Closed garyodonoghue closed 2 years ago
Hey @garyodonoghue
At this time, there is no way to skip documents, but I will consider this feature. The only approach is to set up filters during query time to filter out results based on attribute. You can look at this issue if this helps, #57.
Closing this issue for now.
@smomin Doesn't this PR #58 handle this issue? It seems to me from there that if I add a transform function that returns a null value, the index of the document will not be created.
Yes I think @smomin when you wrote the transform function you allowed a way to skip the entry being indexed, no?
Hey Omar, this PR was not merged. You can use the Algolia rules to filter out record based on a record property.
Sent from my iPhone
On Apr 27, 2022, at 4:57 PM, Omar E. Sourour @.***> wrote:
@smomin Doesn't this PR #58 handle this issue? It seems to me from there that if I add a transform function that returns a null value, the index of the document will not be created.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
No, I initially was going to merge this but then back away from doing it. I will take a look at it again.
Sent from my iPhone
On Apr 27, 2022, at 5:30 PM, Iman Rahmatizadeh @.***> wrote:
Yes I think @smomin when you wrote the transform function you allowed a way to skip the entry being indexed, no?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
Hello @smomin .. following up on this issue. Are there any updates regarding this?
Is there a way to skip/ignore particular document updates, i.e. filtering. For example if i have a collection of documents, each document containing a 'type' property, and I'm only interested in document updates where type == 'sport', how could i achieve this?
I thought of using the transform function to check the 'type' and return an empty response if it's not a value im concerned with, e.g. 'sport' in this example, but looking at the code here, I'm not sure that would be the correct approach.
Any suggestions appreciated, thanks