# Dgraph as a replacement for Elasticsearch

**URL:** <https://discuss.dgraph.io/t/dgraph-as-a-replacement-for-elasticsearch/7488>\
**Category:** Dgraph\
**Created:** [July 2, 2020, 8:13am UTC](https://discuss.dgraph.io/t/dgraph-as-a-replacement-for-elasticsearch/7488 "2020-07-02T08:13:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cabbage.merchant](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@cabbage.merchant](https://discuss.dgraph.io/u/cabbage.merchant)\
**Post date:** [July 2, 2020, 8:13am UTC](https://discuss.dgraph.io/t/dgraph-as-a-replacement-for-elasticsearch/7488/1 "2020-07-02T08:13:19Z")

</div>

Hi all,

Just found out Dgraph few days ago and have few questions to ask.

At current state we have Elasticsearch in production (~500GB) doing some basic full-text search and lots of aggregation. For our upcoming requirements, we need to do lots of JOIN which is not a strong point for ES itself.

Pretty much similar to what he was trying achieve here 👇

> [@Complex Aggregate Sort Query](http://discuss.hypermode.com/t/complex-aggregate-sort-query/3715):
>
> I have a specific query that I need to run. Conceptually I have two node types, programs (movies, show, episodes) and timeslots (the time and channel a program is airing) I need to return a list of programs, that includes the first airing of it timeslot, and also allow for sorting of the entire result set using data in the returned timeslot. So far I have this simple query… {q(func: has(program\_id)) { uid program\_id timeslots (first: 1, orderasc: gmt\_date\_time){ timeslot\_id gmt…

But it was in 2018. Are there any successful story with similar use case? Is Dgraph good at aggregation operation with huge data?

Elasticsearch also has a feature limit called as [`search.max_buckets`](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-settings.html#search-settings-max-buckets) where it will throw an error once the aggregation buckets hits the limit. This is very useful where it forces the user to provide **filter** in their query to cap their aggregation results and not giving any pressure to the server. Is it possible to do it in Dgraph?
