R
R
Ruslan Ezhgurov2016-03-29 09:28:05
JavaScript
Ruslan Ezhgurov, 2016-03-29 09:28:05

What is the best way to implement a search engine?

There are 250,000 objects in the database and a page that should display everything, and you also need to implement a search for these objects. There are thousands of ways, but I would like an effective one, so as not to heavily load the database, it is possible to cache, etc. please advise something!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Kitaev, 2016-03-29
@Oyaseo

If only this
- Postgres + GiN/GiST index on the name field gin_trgm_ops (gist_trgm_ops). It is created like this:
Difference gin/gist in a nutshell:
gin is faster to search, but longer to create, gist is the other way around.
If something more (not just one field, ranking) - Full Text Search. Here the choice is yours. Sphinx, ElasticSearch, Postgres, MongoDB.

D
Dimonchik, 2016-03-29
@dimonchik2013

I am for sphinx, but for 250,000 you can get off with Postgres

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question