LIMIT and OFFSET is not being pushed to Index with Where clause

I am using below index

'CREATE INDEX `240322_feed_post_unfiltered` ON `vidya`.`content`.`feed-post`
(`publishAt` DESC,`score`,`scoreUpdatedAt`) 
WHERE category = 1 AND postStatus = 2 AND `feed`.`id` != "timeline-feed-wisdom";

query

SELECT META(f).id AS id
FROM `vidya`.`content`.`feed-post` f
WHERE publishAt < 1709214823433 AND publishAt > 0
    AND f.category = 1 
    AND f.postStatus = 2
    AND f.feed.id != 'timeline-feed-wisdom'
ORDER BY f.publishAt DESC
OFFSET 100
LIMIT 100

All are exact span, covered index but still limit and offset is outside index.
couchbase → Couchbase Server Enterprise Edition 7.2.3 build 6705

attaching plan text
plantext.txt.zip (1.4 KB)

Track via MB-61266

Workaround change both query and index (f.feed.id != ‘timeline-feed-wisdom’) = true

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.