Back

2 Query types at the same time

  • 0
  • Web
Shahil Algoo
6 Jun, 2023, 16:27
TL;DR
The user is discussing using two query types at the same time and whether using a single index with both attributes is faster. They mention that examples in the documentation would be helpful. They also mention confusion about including the key name somewhere in the code. The user shares some code and receives feedback that it is incorrect. The conversation continues with discussion about errors and the correct code syntax. Eventually, it is discovered that using "&&" instead of "," resolves the issue.
Shahil Algoo
6 Jun, 2023, 16:27

&& instead of , solves this

Shahil Algoo
6 Jun, 2023, 16:27

no need for any other index

Shahil Algoo
6 Jun, 2023, 16:28

were you aware of that?

Drake
6 Jun, 2023, 16:57

No that's incorrect

Drake
6 Jun, 2023, 16:57

Your code should not have changed. You should have left it the same and ran it after adding the index

Shahil Algoo
6 Jun, 2023, 17:24

i get this error

Shahil Algoo
6 Jun, 2023, 17:24

with the comma of course, not with the &&

Drake
6 Jun, 2023, 17:25

again...your code is wrong

Shahil Algoo
6 Jun, 2023, 17:25

with the comma is wrong too?

Drake
6 Jun, 2023, 17:25

share your code please

Shahil Algoo
6 Jun, 2023, 17:26

i get the error with this

Shahil Algoo
6 Jun, 2023, 17:26
Shahil Algoo
6 Jun, 2023, 17:26

i mean i also changed the key to what i named the key which is "notebook_and_status"

Drake
6 Jun, 2023, 17:26

what do you mean?

Drake
6 Jun, 2023, 17:27

did you run this code?

Shahil Algoo
6 Jun, 2023, 17:27

ok so i created this

Shahil Algoo
6 Jun, 2023, 17:27
Shahil Algoo
6 Jun, 2023, 17:27

that's good right?

Shahil Algoo
6 Jun, 2023, 17:27

ok so what should the code be?

Drake
6 Jun, 2023, 17:27

this

Shahil Algoo
6 Jun, 2023, 17:31

ah it works

Shahil Algoo
6 Jun, 2023, 17:31

i thought i had to write the key name somewhere

Shahil Algoo
6 Jun, 2023, 17:32

would be nice with examples like that in the documentation

Shahil Algoo
6 Jun, 2023, 17:33

this works too btw, but i guess the one index with both attributes one is faster

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more