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

text index for multiple fields #6

Open
jcollado opened this issue Jul 18, 2016 · 2 comments
Open

text index for multiple fields #6

jcollado opened this issue Jul 18, 2016 · 2 comments

Comments

@jcollado
Copy link

When trying to create a text index for multiple fields in a collection, the index creation fails.

My guess is that instead of creating one text index with multiple fields, the creation of multiple text indexes is attempted and that fails because only one text field is allowed per collection in MongoDB.

@aldeed
Copy link
Collaborator

aldeed commented Oct 31, 2016

Can you post some code that causes the error?

@wesleyfsmith
Copy link

I am able to trigger this error when I do the following in my schema:

new SimpleSchema(
{
    type: String,
    optional: true,
    index: 'text'
  },
  setting: {
    type: String,
    optional: true,
    index: 'text'
  },
  brand: {
    type: String,
    optional: true,
    index: 'text'
  });

Would be able to get this fixed to be able to search multiple indexes.

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

No branches or pull requests

3 participants