This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-14
Channels
- # babashka (43)
- # beginners (47)
- # biff (1)
- # calva (16)
- # cider (7)
- # clerk (6)
- # clj-kondo (39)
- # cljdoc (49)
- # clojure (29)
- # clojure-brasil (1)
- # clojure-europe (93)
- # clojure-losangeles (1)
- # clojure-norway (34)
- # conjure (7)
- # datalevin (8)
- # events (1)
- # gratitude (3)
- # honeysql (6)
- # hyperfiddle (2)
- # introduce-yourself (1)
- # javascript (1)
- # jobs-discuss (9)
- # lsp (3)
- # malli (10)
- # off-topic (8)
- # pedestal (3)
- # rewrite-clj (2)
- # shadow-cljs (17)
- # sql (33)
- # vim (1)
- # xtdb (31)
Hi folks, I encountered an issue where I’d like to remove data with :name
attribute and failed. My context is as follows:
[1] I put the example schema and data into the db.
[2] The schema has a :name
attribute with :unique :db.unique/identity
constraint.
[3] I loaded the data in
[4] I tried to delete all data with
(d/transact! conn [ <a list of [:db.fn/retractEntity <id>]> ]
[5] I ran get-all
to get all <eav>s and found that all the datoms with the form [e :name v] cannot be deleted, whereas datoms with all other attributes are deleted as expected.
[6] I changed the schema with
(d/update-schema conn {:name {:db/valueType :db.type/string}})
so now name does not have the constraint
[7] I did [4] again but [5] still held
[8] I deleted the :name
attribute
[9] I ran [5] (get-all) and found the remaining datoms are in the form of [e nil v]
The issues here are:
[Q1] How do I delete data at context [4]
[Q2] How do I delete data at context [9]I’m attempting to update from Datalevin 0.7.7 to 0.8.16 and there seems to be some sort of regression in full-text search. A query like this:
(d/q '[:find (pull ?e [*])
:in $ ?q
:where
[(fulltext $ ?q) [[?e _ _]]]]
db
"query")
Throws an exception like this:
java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4
at datalevin.utl.GrowingIntArray.get(GrowingIntArray.java:92)
at datalevin.search.Candidate.get_tf(search.clj:173)
at datalevin.search$score_term.invokeStatic(search.clj:287)
at datalevin.search$score_term.invoke(search.clj:282)
at datalevin.search$tf_idf_scoring.invokeStatic(search.clj:302)
at datalevin.search$tf_idf_scoring.invoke(search.clj:293)
at datalevin.search$score_docs$fn__17461.invoke(search.clj:566)
at datalevin.search.SearchEngine$fn__17211.invoke(search.clj:408)
...
I’m having some trouble coming up with a minimal repro, but I’ll keep trying. Any tips appreciated. 🙂