Fork me on GitHub
#datalevin
<
2022-08-29
>
roklenarcic06:08:44

How does string index work? Does it compare strings lexiographically? This seems odd:

(ddb/-index-range
  (d/db conn)
  :name
  "Peirca" "Peircz")
=> [#datalevin/Datom[100002 :name "Peirce"] #datalevin/Datom[100005 :name "Peirce"]]
(ddb/-index-range
  (d/db conn)
  :name
  "Peirca" "R")
=> []
So “R” is not “more” than “Pericz”?

Huahai19:08:03

{:name {:db/valueType :db.type/string}} , you need to specify schema like so. Otherwise, the data is treated as EDN blob and the order is not going to be what you expect.

roklenarcic19:08:42

I thought I did that, but I guess I applied schema after the fact perhaps