This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-02
Channels
- # announcements (1)
- # architecture (1)
- # aws (21)
- # babashka (37)
- # beginners (173)
- # boot (12)
- # chlorine-clover (5)
- # cider (36)
- # clara (11)
- # clj-kondo (25)
- # clojure (128)
- # clojure-europe (7)
- # clojure-finland (3)
- # clojure-germany (2)
- # clojure-nl (57)
- # clojure-uk (23)
- # clojurescript (71)
- # clojurex (1)
- # core-async (30)
- # core-typed (5)
- # cursive (35)
- # datomic (8)
- # duct (4)
- # emacs (8)
- # exercism (41)
- # fulcro (116)
- # jackdaw (4)
- # jobs-discuss (6)
- # juxt (4)
- # kaocha (16)
- # leiningen (14)
- # malli (5)
- # observability (4)
- # off-topic (2)
- # pathom (19)
- # pedestal (29)
- # re-frame (64)
- # reitit (18)
- # ring (8)
- # shadow-cljs (3)
- # sql (13)
- # tools-deps (32)
- # tree-sitter (5)
- # yada (17)
I have a quick question about how fulltext search works. I have an e
s with multiple strings fields, which I have concatenated together and and added to the db under :e/fulltext
, all of which works. However, I’m a bit lost on how queries with fulltext
work. Lets say I have tokens s1
and s2
, I assumed that two calls to fulltext would result in an “and” search, which it seems to be doing. However, when I call fulltext
just once with the string "s1 s2"
I get a different result, returning a much larger amount of e
s. I’m guessing its the first behaviour that I want, I got a bit confused by the noticeably large discrepancy in return values (in one example, separate calls returned 12 items, while a concatenated single called returned 300+).
The string given to fulltext is a lucene query string: https://lucene.apache.org/core/2_9_4/queryparsersyntax.html
Thank you so much as always, that makes sense. I was surprised that lucene was not mentioned in the docs. I mean, its kind of an implementation detail, but also kind of not really, as the DSL still works
Is there some way to get the datomic version in the repl? I'm thinking something like
d/*datomic-version*
For context, what I'm actually trying to figure out is why this doesn't work:
(d/q '[:find (pull ?e [[:db/doc :as "doc"]])
:where
[?e :db/ident :db.type/boolean]]
(d/db conn))
Execution error (Exceptions$IllegalArgumentExceptionInfo) at datomic.error/arg (error.clj:57).
:db.error/invalid-attr-spec Cannot interpret as an attribute spec: [:db/doc :as "doc"] of class: class clojure.lang.PersistentVector
and I'm wondering if I have an old datomic version or something.