News for hackers. Stuff that matters.
Re:The state of full text search in PostgreSQL 12 by jadbox on Monday February 03, 2020 @12:31PM (#22226503)
Really well put together- I learned several more things about PG text searching from this.

From my personal experience working with dozens of California tech companies of varying sizes, I'd say around 80% of the time I see ElasticSearch being used when the product could have just used their existing PG cluster (and existing team experience). I.e. so many companies pick up ElasticSearch only because they lack of full-text search capability awareness of PG. Of course, ES does have its advantages, but I feel it's in very specific use-cases.

Re:The state of full text search in PostgreSQL 12 by jordic on Monday February 03, 2020 @01:18PM (#22227162)
Postgresql is awesome, but I don't see any advantage when you need to add like 40 aggregations plus joining to 10 tables.. (easy if you denormalize to elastic)
Re:The state of full text search in PostgreSQL 12 by mistahenry on Monday February 03, 2020 @03:33PM (#22228677)
I can think of a bunch off the top of my head that mostly stem from a serious reduction in complexity:

- having one data store instead of two

- no data store synchronization and related consistency headaches

- the ability to easily join/restrict based on business logic (especially access control)

- easier deployments

- easier qa/local setups

- fewer failure scenarios

- although non-standard, you're dealing with sql and can explain/analyze your queries with tools one already knows if one understands postgres

- the ability to extend my existing (Spring Boot) integration tests to test new searching logic without having to worry about a separate test db.

I've been building a travel blogging platform as a side project that has about ~250 users. Through a couple of choice materialized views to create search documents from a number of different tables, Postgres FTS, and some GIN indices, I was able to make a lighting fast search with intelligent suggestions(ie using user specific restrictions such as follower/following, places a user has posted, etc).

Is my search perfect? No. I could do a better job normalizing diacritics, stemming could be improved, etc. But it was dead simple to implement well enough in a very short amount of time. I'm very happy with my current solution. There's a time and place for a dedicated search solution but it's certainly not in fledgling systems without massive load.

Re:The state of full text search in PostgreSQL 12 by aldoushuxley001 on Monday February 03, 2020 @03:49PM (#22228877)
Ever consider doing a write up of how you implemented your Postgres FTS? Sounds like you’ve had a good experience with it.
Re:The state of full text search in PostgreSQL 12 by jordic on Monday February 03, 2020 @04:34PM (#22229420)
Missed the part about serving the response bellow 50ms :) Not too much traffic.. between 40/50 req/s.. and a lot of other more important things to be stored on postgres (transactions, stocks.. )
Re:The state of full text search in PostgreSQL 12 by e12e on Monday February 03, 2020 @03:39PM (#22228761)
How do you denormalize to elastic without preforming joins on your normalized data?
Re:The state of full text search in PostgreSQL 12 by jordic on Monday February 03, 2020 @04:37PM (#22229451)
Haha, just joining them ..