Fork me on GitHub
#datomic
<
2015-08-31
>
robert-stuttaford07:08:55

two matches in the same body of text?

misha09:08:35

@robert-stuttaford good morning, the actual value was:

:some/attr ["yy xx" "yy zz"]

misha09:08:36

returning 2 matches within the same entity is probably ok, but both with score 1.0? meh

robert-stuttaford11:08:11

@misha, they’ll simply be providing you what the underlying fulltext engine is providing datomic

sdegutis22:08:28

What's the idiomatic way to catch an exception when a Lookup Ref fails inside a transaction, e.g. [:user/email ""]?

sdegutis22:08:34

Specifically I'm trying to catch this: java.lang.IllegalArgumentException: :db.error/not-an-entity Unable to resolve entity: [:user/email "foo"] in datom [#db/id[:db.part/user -[redacted]] :account/admin [:user/email "foo"]]

sdegutis22:08:53

Are you supposed to just (catch IllegalArgumentException e) and look inside (.getMessage e) for the exact sub-string ":db.error/not-an-entity"?

sdegutis22:08:05

Because if so, that seems pretty fragile.