I have some questions on how the query engine works internally,
I changed my example to movie but it can applied to something else:
ft.explaincli movie "@category:{1|2} @releaseYear:{2021} @isBlockbuster:{FALSE} limit 0 60
INTERSECT {
TAG:@category {
1
2
}
TAG:@releaseYear {
2021
}
TAG:@isBlockbuster {
false
}
}
Is the order of query params important?
If f.e. I know that :
- category 1,2 would yield 3M rows
- releaseYear: 300K
- and isBlockBuster: 200
-
Would changing the position of the fields make any difference (placing the most limiting one first f.e.)?
-
Does redisearch internally fetches a reference to of all these “tags” entries and need to loop over all of them to find the intersection?
-
Is there a way to have a combined index of fields to have "faster/ less “heavy” queries:
f.e. combined field entry in the inverted index : category_releaseYear_isBlockBuster that immediately would point to the right doc ids,
without the need of doing some intersection internally … probably will have to create new field myself if I want this behaviour? -
Are there any other quick wins possible, some extra placement with () in the query and have intersections behave differently/ faster?
Thanks a lot!
Jayme