Skip to content

Add support / test ability to use "non-lexical" sort on $lexical field for Collections #2109

@tatu-at-datastax

Description

@tatu-at-datastax

In addition to using proper lexical sort like:

{
  "find": {
    "sort" : {"$lexical": "banana" }
  }
}

spec says one should also be able to use regular sort like:

{
  "find": {
     "sort" : {"$lexical": 1 }
  }
}

but this is not currently tested, and likely not implemented. Let's add tests to verify.

EDIT: added test which fails -- and realized why we might not be able to make this work: if I remember correctly, in-memory sort for Collection documents only works on shredded fields stored in query_xxx_values (like query_text_values), and not on everything stored in doc_json. Given that we have separate query_lexical_value it will not be accessible (it's not map unlike other pseudo-index columns, but in general not included for sorting).

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementEnhancement to existing featureFeature - CollectionsIssue impacts users of CollectionsOn HoldNot ready for active development

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions