N1QL View Index create :
CREATE INDEX ix_default_2 on default(COL_1,COL_4,COL_5,COL_3) USING VIEW;
CREATE INDEX ix_default_5 on default(COL_1, COL_2) USING VIEW;
(1) This query result is valid. (COL_3 between 0 and 3)
Select count(*) from default
where COL_1=‘000’ and COL_2 like 'YYY%'
and COL_3 between 0 and 3 and COL_4=true and COL_5=false
order by length(COL_2) ASC, COL_6 ASC;
=> Count Result is 6000. It is valid.
(2) This query result is not valid. ( COL_3 >= 0)
Select count(*) from default
where COL_1=‘000’ and COL_2 like 'YYY%'
and COL_3 >= 0 and COL_4=true and COL_5=false
order by length(COL_2) ASC, COL_6 ASC;
=> Count Result is 2000. It is not valid.
Are there any difference?
Is there anyone who knows similar issues?