Reputation: 83
I am using MarkLogic 8
and using the Java Api to write and read documents.
I am storing documents as json
and the json
contains a node that is a time stamp in milliseconds( java long value). I need to query documents based on this timestamp.
I.e., say for a given range longvalue1 to longvalue2. How do I do that?
I have seen examples like -
{ query { "key": "value"} }
But can I use > or < in the query there?
Upvotes: 2
Views: 96
Reputation: 2475
Please read through the Search Developer's guide section on Query By Example. You can create a range index of type long on your timestamp property then use Comparison Operators on Range Query.
Upvotes: 3