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

Where() on compount indexes does not work #57

Closed
FMCorz opened this issue May 14, 2015 · 5 comments
Closed

Where() on compount indexes does not work #57

FMCorz opened this issue May 14, 2015 · 5 comments

Comments

@FMCorz
Copy link

FMCorz commented May 14, 2015

I have tried several times to query on a compound index without success.

{
  keyPath: ['foo', 'bar']
}

.where(store, ['foo', 'bar'], ...) // Using compound index
.where(store, 'foo, bar', ...)  // Expected name by YDN?
.where(store, 'foo,bar', ...)  // Expected name by YDN?
.where(store, 'foo_bar', ...) // Custom name

With, or without name, lead to no success. Sometimes it appeared that it was working but in fact the where was not filtering anything. I might have done something wrong, but I couldn't debug because the source code was minified and I do not have time to start building the app.

Cheers,
Fred

@FMCorz
Copy link
Author

FMCorz commented May 14, 2015

Forgot to mention that my workaround was to create an index with a generator using both values. And then doing a search on that index. Not sure if that's a good workaround long term, but that appeared to be working.

@yathit
Copy link
Owner

yathit commented May 14, 2015

Your talking don't not make sense and creating rubbish issues annoying.

Proof your claims in jsbin and read before you do.

If you don't have time to read and understand, this library is not for you.

@FMCorz
Copy link
Author

FMCorz commented May 14, 2015

I am sorry if you're considering that my issues are rubish. I have spent hours yesterday trying to get this to work, I have tried to debug the minified JS, I have read everything I could and googled extensively. I will try to provide a code sample, but any help would be appreciated.

@yathit
Copy link
Owner

yathit commented May 14, 2015

From the above documentation,

compound key can be created either by compound index using array keyPath or key itself

So the name of the index does not matter. You give some name and use it. Compound index works in every ways.

@yathit yathit closed this as completed May 23, 2015
@mdjnelson
Copy link

Hmm, thanks Fred. Interesting point, however I have to agree - your talking don't not make sense and creating rubbish issues annoying.

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

3 participants