1

I have this query to execute from my application against a full text search couchbase index :

BooleanQuery booleanQuery = buildQuery(params);
SearchQuery searchQuery = new SearchQuery(
                "index_name",
                booleanQuery
).sort("createionDateTime")
 .limit(10);

How to specify sort direction for createionDateTime ?

Thanks for your help

Lho Ben
  • 2,053
  • 18
  • 35

1 Answers1

1

sort direction is defined using "-" for descending and nothing for ascending direction so for this case, to chse desc direction

sort("-createionDateTime")
Lho Ben
  • 2,053
  • 18
  • 35