Tu Anh
Tu Anh

Reputation: 367

Mongodb vs elastic search for non-full-text search

I am making an website that use mongoDB to store product information. I want to use elastic search to let user search products by name or description.

However, I also want to let user search products by their category, regions... (which is not full text search).

In that case, should i also use elastic search or normal mongoDB query for search? Is there any benefit elastic search can bring to the table when the search is not full-text search.

Upvotes: 2

Views: 1335

Answers (1)

Val
Val

Reputation: 217274

Elasticsearch is not only useful for full-text search, but also for term-level search (i.e. exact search), geo search, ... and of course aggregations.

If you need any of this, then ES is worth investigating. Also, you should not necessarily take the "either-or" stance, you can definitely use both in conjunction as they are complimentary.

There are a few other answers worth looking at:

Upvotes: 3

Related Questions