5

When retrieving data from the Ardor api, why is the data returned not in chronological order?

enter image description here

3

2 Answers 2

3

The results are first ordered by the score which Apache Lucene assigns to them . If two results get same score, they are ordered by blockTimestamp, descending (what happens with the 2nd, 3rd and 4th result in your data).

Apache Lucene is configured with the default BM25Similarity with parameters k1 = 1.2 b = 0.75, i.e. Ardor uses the default scoring function. More details about that function can be found here. The query parser is configured with default operator AND, so if your query contains two words, they must both be present in order for the data to be included in the result

1

From petko:

They are ordered by ScoreDoc.score - see https://lucene.apache.org/core/7_2_1/core/index.html?org/apache/lucene/search/ScoreDoc.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.