Fork me on GitHub

I have a quick question about how fulltext search works. I have an es 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 es. 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:


the default operator for terms is OR


“s1 s2” = “s1 OR s2"


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



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"]])
              [?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.


Nevermind, I was able to figure out the version another way. My datomic is too old, so that's probably the problem.

👍 4