coen.bakker

coen.bakker

Advice for building search based on search phrase relevance and user profiles?

One of my web apps reached a point that it is now time for me to build a search feature for it. On the one hand user’s need to be able to find relevant content using a search bar, on the your hand the content that is loaded on the initial page load should be relevant to the user that is logged in. Therefore, I am eager to learn about how to query my database ‘by relevance’.

I am pretty much starting from scratch. I will need to learn about full text searches, indexing, user profiling, signals, Inverse Document Frequency, etc. (these are some of the topics I read about somewhat so far). Also, I also hope to become knowledgable about best practices, limitations and optimizations.

Any advice regarding learning resources? Or how to approach this learning journey?

I ran into this book: About this Book · Relevant Search: With applications for Solr and Elasticsearch. It covers the topic nicely, it seems. It focusses on ElasticSearch or Solr. I am not planning to use ElasticSearch or Solr, though, but rather stick to Postgres.

Most Liked

bdarla

bdarla

One of the books I liked on this topic is AI-Powered Search by Manning. It employs Solr for the provided examples.
BTW, I remember a discussion I had with @dimitarvp wherein he mentioned Meilisearch as a lightweight alternative to ElasticSearch and Solr.
Myself, I have used in practice ElasticSearch. It provides the functionality I need, it is easy to interact with Elixir via the snap library. Of course, optimising the cluster and dealing with the required resources might be an issue.

NickGnd

NickGnd

Hey @coen.bakker :wave:
In the past I implemented a fuzzy search with postgres using the pg_trim extension with good results, but I don’t think it can work reasonably good and fast when dealing with full books, maybe you can give it a try.

Some resources:

Hope it can be of help, keep us updated :v:

coen.bakker

coen.bakker

This thread has been useful also. Hadn’t found it before.

cmo

cmo

There is typesense too, which is billed as an algolia alternative or a lightweight alternative to elastic. IIRC it does want to keep a lot of stuff in memory.

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

We're in Beta

About us Mission Statement