Is it possible to search for a phrase using full-text search? I noticed that searching for "red fox" in the example essentially gives you results for both "red" and "fox" but not for "red fox" specifically.
Phrase search can now be done with expended search expressions
If you turn on :index-position? , the search engine does proximity search by default. So "red fox" close together will come up ahead than if they appear individually. Extended search functionallity including full-blown phrase search and boolean operators, etc. are on the roadmap.
Thanks!
What strategies do you use when testing datalevin? With datomic I can use the in memory db just as a value, so from that perspective testing is fairly easy. Are there any specific strategies to consider when testing with datalevin?
The same test strategy as if you are using sqlite. Creating a temporary DB and read/write on it for one test. Create another for another test. That's how Datalevin tests run internally. It's cheap to create many DL dbs.
Hello everyone, i just learned about datalog and Datelevin wanted to give it a try, while i am able to understand the queries, thx to the help fo some resources online and was able to make a very simple todo app work,, i struggle to understand how i would build a db schema for a bigger project i am kinda lost thinking to much in sql terms maybe - Are there resources on that which could help? I wasn't able to find them my self so far
The same Entity Relation (ER) modeling approach for your SQL DB applies in Datalog.
There's really no difference. If anything, one can argue that Datalog embodies the relational ideals more deeply.
https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model
What are your struggling with?
So for simple Example: In Lets say in SQL i have a simple "Articles" "categories" example: Table Articles: id, title content, author Table Categories: id, name Table ArticlesInCategories: id_article, id_category would i do the exact same in Datalevin/Datalog?
Why not?
In fact, you don't need the ID
ID is automatic in Datalevin, you only needs the domain attribute
the general strategy is the following:
table -> attribute namespace
column -> attribute
foreign key column -> ref
so your schema above is translated into this:
{:article/title {...}, :article/content {...}, :article/author {could be a ref}, :article/category {a ref}, :category/name {...}}
that's it
Hmm, ok, mb i thougth... well i dont know what i thought, so basically not much if at all changes in the schema
ok, thank you for the clarification
As you can see, Datalog schema is actually simpler, isn't it? You don't need to manually set up ID, which is an implementation details, not part of the domain.
What they call "incidental complexity".