Is there an Effective way to create an Index on a very changeable field

I would like to create an index, but ı have a problem. My field is very changeable. the quantity field represents the number of products and I should get greater than zero quantity. I wonder that When I create an Index with quantity, it is effective? Or I will happy when I hear your suggestions.

For Example, My query is:
SELECT productId
FROM Inventory
WHERE type=‘warehouse’ and warehouseId =1 and totalQuantity > 0

I guess my indexes could be either of one
-CREATE INDEX idx_inventory_qty ON Inventory(warehouseId,productId,type) WHERE (0 < totalQuantity)
or
-CREATE INDEX idx_inventory_qty ON Inventory(warehouseId,productId,type,totalQuantity)

or what’s your suggestions?

The changeable field is no impact on the index selection.
If you need upto date date use scan_consistency with your query Availability and Performance | Couchbase Docs

CREATE INDEX `ix1` ON `Inventory` ( `warehouseId` ,`totalQuantity`,  productId) 
WHERE type="warehouse"

thanks, it’s worked for me