Replies: 1 comment 2 replies
-
Interesting thought! Two cents from me:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When no
order()
is specified in a Gremlin Traversal, ElasticSearch requests don't specify anysort
criteria [1][2].By sorting on the
_doc
field (ElasticSearch "index order"), we might be able to reduce queries latency, as suggested in ElasticSearch documentation:I've run a simple benchmark locally (code here):
_doc
field this timeResults are as follows:
I've run this benchmark several times and while the gain for queries returning 1 000 or 10 000 vertices varies, it is very consistent for queries returning 50 000 or 100 000 results.
If you can think of any flaw in the benchmark or can suggest a more robust way (libraries? datasets?) to run another benchmark, please let me know!
Related to this, if we always specified
_doc
as the last sort criteria for all requests (and not only for those that don't have a sort order), we could maybe make results order stable? (see this comment from @li-boxuan pointing out that sort is unstable)I guess the same change could be applied to SolR but I haven't looked into it.
Beta Was this translation helpful? Give feedback.
All reactions