It is quite powerful and you can even choose to "stringify" or co-erce types automatically to deal with dirty data.
4,443 karma · joined October 20, 2010
kishore at typesense org https://calendly.com/kishorenc/30min
It is quite powerful and you can even choose to "stringify" or co-erce types automatically to deal with dirty data.
a) While Algolia (from what is available publicly) has indices which are pre-sorted on a set of ranking factors, Typesense allows dynamic, on-the-fly sorting.
b) Also I believe Algolia memory maps their indices, but Typesense stores the raw JSON documents on-disk and constructs the index from scratch on start-up.
At the heart of Typesense is a `token => documents` inverted index backed by an Adapative Radix Tree (https://db.in.tum.de/~leis/papers/ART.pdf), which is a memory-efficient implementation of the Trie data structure. ART allows us to do fast fuzzy searches on a query.
All indices are stored in-memory, while the documents are stored on disk on RocksDB. All underlying data structures were carefully designed, benchmarked and optimized to exploit cache locality and utilize all cores efficiently.
Full disclosure: I work on a similar fast, typo tolerant, fuzzy search engine search engine called Typesense (https://github.com/typesense/typesense).
While HN crowd has a reputation of being too cynical at times (the most famous example being the original "Show HN Dropbox"), over time, pre-empting how the HN crowd will potentially react and what kind of criticism a project might attract has actually helped me improve the product before launch!
> I mean one day you got traffic 100K on the website. Good. But just for one day.
My latest project, Typesense, which is an open source instant search engine (https://github.com/typesense/typesense) literally found traction only after posting here on HN. Yes, it was a ~50K single day traffic, but it had a permanent impact on the baseline traffic. So nothing is as useless as it looks :)
Apart from the value I've gotten out of all these Show HNs, there is an incredible amount of value in the comments on HN. In fact, I often just skip the main post and just skim through the comments. Also, unlike certain other forums, snarky/toxic comments are discouraged and moderated.
You can "poll" for new records for indexing by using a query, but handling deletes/updates is the real deal breaker. You will then have to use both the binlog (atleast for mysql) and querying, at which point it becomes quite complicated to reason about.
Using this approach for a typo-tolerant instant search engine that I am working on: https://github.com/typesense/typesense
I wanted to protect future potential commercial interests without stifling the spirit of open source collaboration and development.
I asked around for advice and eventually just chose GPL over AGPL because a lot of legal teams seemed allergic to AGPL and some companies even had a blanket ban on it.
I also thought that the greatest risk for my project was not an existing or future competitor: it was death by obscurity. To that end, I did not want to slow down adoption by choosing a license that screamed "$$$" or made somebody's legal team uncomfortable. In any case, if a big company wants to copy you, they will and can with the resources they can throw at it.
On the other hand, there are popular projects that do use AGPL (MongoDB) so it might not be that big of a deal in the real world :)
On the other hand, when you enter the market too early, you might have the "novelty" factor but it's really difficult to stay under the radar: clones show up fairly fast. So unless you are able to stay underground and still grow fast (improbable but not impossible), your early-to-market advantage is really not that big of a deal.
Finally, the size of the addressable market also plays a big role. A large market can easily support new companies that can execute better.
If you want a dead simple way to integrate search onto your site/app but find the learning curve of something like Elasticsearch steep, take a look at this project that I've been working on:
https://github.com/typesense/typesense
Typesense is an attempt to offer a great search experience out of the box -- with minimal configuration. It also supports clustering/HA, so you can certainly go a long way before considering something like ES (which is a great product but also pretty beefy).
I've been working on an open source search engine for a few years (https://github.com/typesense/typesense) that's far more easier than Elasticsearch for a number of use cases and is a great alternative to Algolia.
I was faced with this same dilemma when I started out: how do I protect future commercial interests without stifling the spirit of open source? Eventually I just chose good old GPL and decided against BSL-like licenses for a number of reasons.
GPL is a fine balance. When you are small, your greatest risk is not an existing or future competitor: it is death by obscurity. To that end, you don't want to slow down adoption by choosing a license that screams "$$$" or makes somebody's legal team uncomfortable. In any case, if a big company wants to copy you, they will and can with the resources they can throw at it.
This not just a case of “they did A, so we will respond with B”. It's a case of “they did A, B, C, etc. so we are responding with X after 10+ years“. To be fair, successive US administrations across party lines gave CCP a long enough rope.