Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinct entries #114

Open
sarita-dc opened this issue Nov 18, 2015 · 6 comments
Open

Distinct entries #114

sarita-dc opened this issue Nov 18, 2015 · 6 comments

Comments

@sarita-dc
Copy link

I want to fetch distinct entries from the field. Is there any option where I can avoid duplicate entries?

@developeron29
Copy link

+1

1 similar comment
@Yonben
Copy link

Yonben commented Feb 8, 2016

+1

@mizzao
Copy link
Collaborator

mizzao commented Feb 10, 2016

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.

@Yonben
Copy link

Yonben commented Feb 10, 2016

@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.

@mizzao
Copy link
Collaborator

mizzao commented Feb 10, 2016

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 :)

@Yonben
Copy link

Yonben commented Feb 10, 2016

I see, thanks a lot !

2016-02-10 17:56 GMT+02:00 Andrew Mao [email protected]:

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
#114 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants