Answer the question
In order to leave comments, you need to log in
How to do searches with Elasticsearch/PostgreSQL?
I have a base with products
CREATE TABLE products (
id BIGSERIAL NOT NULL PRIMARY KEY,
title VARCHAR(100) NOT NULL,
description TEXT NULL,
price BIGINT NOT NULL
);
Answer the question
In order to leave comments, you need to log in
The easiest way is to send data from the code to Elasticsearch and PostgreSQL in parallel. And you can pile up the system from a trigger, a notification mechanism and a handler for these notifications, which will send data to Elasticsearch. But it won't be easy.
reindex only changed ones!
PostgreSQL
last_update products
(timestamp) and indexed (1/0)Elasticsearch
product ID, be sure to understand it and the selection will take place.Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question