Skip to content
Back

Query not valid: Query type does not match expected: double

  • 0
  • Flutter
conqueror
30 May, 2023, 20:38

yes i know about it, but for Queries page there is no such otption

TL;DR
User encountered an error "Query not valid: Query type does not match expected: double". Solution was to create an index in the Appwrite console. User had concerns about future versions not accepting double values and no longer requiring indexing. Solution to this was not provided. Additionally, there was some confusion about the database being busy and a request for a picture. A blog was recommended for indexing Appwrite collections.
conqueror
30 May, 2023, 20:38

ok, just a minute

Haimantika
30 May, 2023, 20:39

It’s a little old though

conqueror
30 May, 2023, 20:39

see

Haimantika
30 May, 2023, 20:40

I meant a picture of this

conqueror
30 May, 2023, 20:40

ok

conqueror
30 May, 2023, 20:41

here its

conqueror
30 May, 2023, 20:42

from last 10 minute

Drake
30 May, 2023, 20:42

give it another 20 minutes

conqueror
30 May, 2023, 20:42

why?

Drake
30 May, 2023, 20:42

database is busy at the moment

D5
30 May, 2023, 20:43

So database distributes "power" within all users?

Drake
30 May, 2023, 20:44

yes?

conqueror
30 May, 2023, 20:58

have small doubt like if appwrite upgraded the cloud version then my app will give error because in newer version it does not accept double value nor indexing is needed, so how can i handle this( in production mode updating takes time )

Drake
30 May, 2023, 21:02

sorry i don't understand

conqueror
30 May, 2023, 21:03

have a slight concern. If the cloud version of Appwrite is upgraded, my app might encounter an error. This is because the newer version doesn't accept double values and indexing is no longer required. How can I manage this situation considering that updating in production mode takes time?

Drake
30 May, 2023, 21:05

what do you mean newer version doesn't accept double values?

conqueror
30 May, 2023, 21:05

talking about this line of code Query.lessThan('totalQuantity',20.00),

conqueror
30 May, 2023, 21:06

previously using this line of code like this Query.lessThan('totalQuantity',20),

Drake
30 May, 2023, 21:06

is totalQuantity an int?

conqueror
30 May, 2023, 21:07

its an double

Drake
30 May, 2023, 21:11

there shouldn't be a problem with Query.lessThan('totalQuantity',20.00) at all so im not sure where the problem is

conqueror
30 May, 2023, 21:15

yes its working after creating index in appwrite console, but what if appwrite team migrate appwrite cloud from 1.1 to 1.3 , will this line of code work fine.

Drake
30 May, 2023, 21:16

yes, it's fine to have an index. it's actually encouraged to have an index

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