Fork me on GitHub

'[:find [(pull ?u2 pe) ...]
  :in $ pe ?uuid
  [?u :user/uuid ?uuid]
  [?u :user/primary-email ?email]
  [?u2 :user/primary-email ?email]
  [?u2 :user/uuid ?uuid2]
  (not [(= ?uuid ?uuid2)])]
In this query, :user/primary-email is a :fulltext attribute, which degrades overall performance. How can I tweak the [?u2 :user/primary-email ?email] clause to use a strict = predicate?


--- A simplified version of the question:

'[:find [(pull ?u pe) ...]
  :in $ pe ?email
  [?u :user/primary-email ?email]]
How do I skip the :fulltext querying here. (all other logic from the former query can be done in plain Clojure, out of the result of the simplified query)


There is no full text querying unless you use the fulltext function


Datalog joins are always exact match only


that surprises me, since a single-clause query consisting of [?u :user/uuid ?x] takes 1ms, while a single-clause query consisting of [?u :user/email ?x] takes 80ms. In both cases, ?x is a fixed param I pass to the query. I imagined the difference is due to :fulltext being a part of my :user/email schema, but maybe there's some other explanation


Debugged, this was indeed something else, related to indices. Solved now. Thanks for the pointer!


Did you not have a normal :db/index true on the :user/email attribute?


We believed we had indices in place, but there was some issue with the tooling that emitted these indices. So these attributes stayed in their default of false