FoundationDB / fdb-record-layer

A record-oriented store built on FoundationDB
Apache License 2.0
575 stars 102 forks source link

Full Text: Sorts are not supported with full text queries #55

Open alecgrieser opened 5 years ago

alecgrieser commented 5 years ago

The proximate cause for this is this line in the planner:

https://github.com/FoundationDB/fdb-record-layer/blob/4b6455ffd24cd4e21c9db916f95d1afd8e3d0976/fdb-record-layer-core/src/com/apple/foundationdb/record/query/plan/RecordQueryPlanner.java#L986-L993

If sorts were to be supported, there would need to be extra logic to figure out what components are missing from the sort and if the remaining fields in the text index (after the text field) are compatible with the sort ordering.

alecgrieser commented 5 years ago

Oh, and this is much more straightforward for the equality text predicates (e.g., TEXT_CONTAINS_PHRASE). The inequality text predicates would require in-memory sorting after scanning, which is a feature that the Record Layer doesn't support generally.