Fork me on GitHub
#datomic
<
2015-08-30
>
misha23:08:24

hello. is there any way to "enhance" full text search? Some query string syntax for exact match, etc.?

(datomic.api/q 
  '[:find ?e ?v ?score
    :in $ ?s
    :where [(fulltext $ :some/attr ?s) [[?e ?v ?tx ?score]]]]
  db "xx yy")
returns me these search results:
([17592186045571 "yy xx" 1.0]
 [17592186045571 "yy zz" 1.0])
1st one is ok, since it has both words (though in different order), but the score of the 2nd one is not really ok, since result is missing 1 word, and has different one instead.

misha23:08:38

actually, false alarm, these 2 results belong to the same entity, this is why it returns me the irrelevant one too

misha23:08:10

not sure why it does that though.