Open sarita-dc opened 8 years ago
+1
+1
This is best done in the logic that populates the collection you give to autocomplete, and not handled by the package itself.
Perhaps you can try publishing a collection.distinct()
query from the server, for example.
@mizzao Maybe there's a way I don't see because of my lack of experience, but collection.distinct() returns an array not a cursor, so I can't integrate it with the auto-complete, as it asks for a collection.
Yeah, you'd have to do some more legwork to get it from the raw Mongo query, over a publication, into a collection on the client :)
I see, thanks a lot !
2016-02-10 17:56 GMT+02:00 Andrew Mao notifications@github.com:
Yeah, you'd have to do some more legwork to get it from the raw Mongo query, over a publication, into a collection on the client :)
— Reply to this email directly or view it on GitHub https://github.com/mizzao/meteor-autocomplete/issues/114#issuecomment-182443492 .
I want to fetch distinct entries from the field. Is there any option where I can avoid duplicate entries?