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


user88222: 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

user86547: 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

3029: <p>When retrieving data from the Ardor api, why is the data returned not in chronological order? </p>

<p><a href="https://i.stack.imgur.com/QYiFq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QYiFq.png" alt="enter image description here"></a></p>
 88222: <p>From petko:</p>

<p>They are ordered by <code>ScoreDoc.score</code> - see <a href="https://lucene.apache.org/core/7_2_1/core/index.html?org/apache/lucene/search/ScoreDoc.html" rel="nofollow noreferrer">https://lucene.apache.org/core/7_2_1/core/index.html?org/apache/lucene/search/ScoreDoc.html</a></p>
 86547: <p>The results are first ordered by the <a href="https://lucene.apache.org/core/7_1_0/core/org/apache/lucene/search/package-summary.html#scoring" rel="nofollow noreferrer">score which Apache Lucene assigns to them</a> . If two results get same score, they are ordered by <code>blockTimestamp</code>, descending (what happens with the 2nd, 3rd and 4th result in your data).</p>

<p>Apache Lucene is configured with the default <a href="https://lucene.apache.org/core/7_1_0/core/org/apache/lucene/search/similarities/BM25Similarity.html" rel="nofollow noreferrer">BM25Similarity</a> with parameters k1 = 1.2 b = 0.75, i.e. Ardor uses the default scoring function. More details about that function can be found <a href="https://en.wikipedia.org/wiki/Okapi_BM25" rel="nofollow noreferrer">here</a>. The query parser is configured with <a href="https://lucene.apache.org/core/7_1_0/queryparser/org/apache/lucene/queryparser/classic/QueryParserBase.html#setDefaultOperator-org.apache.lucene.queryparser.classic.QueryParser.Operator-" rel="nofollow noreferrer">default operator</a> <code>AND</code>, so if your query contains two words, they must both be present in order for the data to be included in the result</p>
