Is it possible to handle all 4 below N1QL queries in a single index? Need to sort by OriginalWidth (asc & desc) or OriginalHeight(asc&desc) - based on user input.
--Query 1
select Id
from `QA-ImageManagement`
Where Type = 'Image'
order by OriginalWidth
limit 10
offset 0
--Query 2
select Id
from `QA-ImageManagement`
Where Type = 'Image'
ORDER BY OriginalWidth desc
limit 10
offset 0
--Query 3
select Id
from `QA-ImageManagement`
Where Type = 'Image'
ORDER BY OriginalHeight
limit 10
offset 0
--Query 4
select Id
from `QA-ImageManagement`
Where Type = 'Image'
ORDER BY OriginalHeight desc
limit 10
offset 0
This is just an example. My actual query has around 7 sort fields (both asc& desc - based on user input). Any help is highly appreciated. Thank you.