Fork me on GitHub

Hi there. Finally managed to wrap up an article showcasing a demo of using Crux from TypeScript. Maybe it's interesting to anyone here 🙂

🙂 15
🎉 6
👏 9
Steven Deobald18:01:38

@U8ZN5EHGU This is insanely cool. Thanks for publishing this!


Thanks! Glad to hear 🙂


Hi, I tried to store UTF-16 chars using the rocksdb - it was a bad choice. What backend should I use if I want to store UTF-16 chars which backend would you recommend and also could you supply an example config? This is for a small in house (home) solution.


Wdym by utf-16? Java supports unicode and encodes strings transparently to the user. The storage representation may be utf8, utf-16 or whatever the low level db might prefer.


I am storing characters from way up in the unicode character space. I had everything set up with rocksdb, but this does not support UTF-16. I was hoping someone might have a working example of the sqlite config as this may support the right characters.


Sqlite is not straight forward to get to be set to UTF-16 as the API need to open the DB with an alternative open command. I am therefore wondering if there is any alternative for storing UTF-16 in CRUX?


In the end I have decided that as I am only storing the text and not querying it I can afford to base64 encode it and this seems to work.


I do however have another issue: I have two queries as above: The first returns a list of chapters numbers, they are strings. The second I try to fetch a set of entities by the chapter number. I have copied the example query from the docs, but I get an empty set even though the first query returns values. What is happening?


If you call .getBytes on your strings I think you should be able to store them as regular byte-arrays - did you try that already?


I might be wrong, but can’t UTF-8 encode all of the unicode range? Isn’t this more likely an issue with querying character which are multibyte encodings in UTF-8?


E.g. the sign in UTF-8 is E2 82 AC (from unicode pane at U+20AC )

R.A. Porter23:01:38

Say I have a document with a list/vector component to it, like here: I see how the query works for finding all docs with carrots in the list. Is there a way to execute a query to find all documents where [carrots peas] are in the list?