For example I would like to have the documents of category cat1 ordered by attr1 asc paginated.
So the result should be: doc1,doc2,doc3.
Note that doc3 doesn’t have a relation with attr1, it’s only contained on the cat1.
Hi Michel, probably I wasn’t clear describing what I would like to have.
I would like to retrieve the documents( all 3 docs) associated to the category ordered by a specific attribute value and then paginate the result.
Hi Michel,
first of all thank you for the answer.
As you see the result doesn’t include the “doc3”.
To give you an example, imagine to have an e-commerce category like “cameras” that has some attribute like “megapixels” and “color”.
I would like to get all products contained in the category ordered by a category attribute (“megapixel”).
I know how I can do it, but I don’t know how I can show a product that is in the category that DOESN’T have a value for a specific attribute (i.e. color).
I’ve tried something like: retrieve products with the specific attribute “UNION” with the products that don’t have the attribute, but in this case I don’t know how I can paginate the results.
Hi @n3wtron,
As described here, if you want to include nodes that do not have the given predicate, then you should not index on that predicate. In your case do not index color when you specify orderasc: color.