document id are formed in the following fashion:
order_productIdInt_customerIdInt_orderId
order_123_5060_12
First, I read id is indexed and faster to query. so thinking of querying for orders for a specific product (say all orders for product id 123). I tried the following but it is not working:
String regexId = "\\border_" + productId + "_.*\\b";
Expression exp = Expression.property("id").regex(Expression.string(regexId));
but it finds no documents but i am sure there are documents. What am I doing wrong? While I intend to measure the performance, is there an advantage already to using the id field?