Skip to content

List property ordering - utilize mixed index #4860

@pm-osc

Description

@pm-osc

Describe the feature:
Extend JanusGraph to support ordering of list properties via mixed index backend. Based on my research it seems that both ElasticSearch and Solr is capable of properly ordering indexed documents also based on a multi-value properties so from mixed index backend perspective this feature is possible.

How ordering via mixed index backend works for single cardinality property?
When it comes to ordering a query result by a single cardinality property, JanusGraph utilizes the mixed index backend in case mixed index is defined for the given property. This is how the profile of the query looks like for the "name1" single cardinality String property.

Image

How ordering via mixed index backend does NOT work for list cardinality property?
At the same time if a "name2" property with list cardinality is used for ordering (mixed index is in place similar to the "name1" property), JanusGraph does not use any index while perform ordering (mind the OrderGlobalStep line at the end).

Image

Describe a specific use case for the feature:
I just simply would like to efficiently order list cardinality properties by utilizing ElasticSearch mixed index backend.

Sample groovy file is provided that describes creating the graph, test data and query to execute.

ordert_testgraph.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions