michaeljmarshall commented on code in PR #4353:
URL: https://github.com/apache/cassandra/pull/4353#discussion_r2688025092
##########
src/java/org/apache/cassandra/index/sai/disk/v1/segment/Segment.java:
##########
@@ -112,10 +109,23 @@ public KeyRangeIterator search(Expression expression,
AbstractBounds<PartitionPo
return index.search(expression, keyRange, context);
}
+ /**
+ * Order the on-disk index synchronously and produce an iterator in score
order
+ *
+ * @param exp to search on disk index
+ * @param keyRange key range specific in read command, used by ANN index
+ * @param context to track per sstable cache and per query metrics
+ * @return an iterator of {@link PrimaryKeyWithScore} in score order
+ */
+ public CloseableIterator<PrimaryKeyWithScore> orderBy(Expression exp,
AbstractBounds<PartitionPosition> keyRange, QueryContext context) throws
IOException
+ {
+ return index.orderBy(exp, keyRange, context);
+ }
+
@Override
- public KeyRangeIterator limitToTopKResults(QueryContext context,
List<PrimaryKey> primaryKeys, Expression expression) throws IOException
+ public CloseableIterator<PrimaryKeyWithScore> orderResultsBy(QueryContext
context, List<PrimaryKey> primaryKeys, Expression expression) throws IOException
Review Comment:
I went with `orderer` for the name, let me know if you prefer `ordering`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]