elide icon indicating copy to clipboard operation
elide copied to clipboard

An Elasticsearch Data Store in contrib

Open xiaoyao1991 opened this issue 9 years ago • 0 comments

I came across this use case where I want to index models to Elasticsearch after they are created and saved(through POST/PUT/PATCH) , so that they can be exposed with richer search capabilities. I see Chris has tried something like that in #243 , but I haven't yet looked deep into it.

My first thought is to have an ElasticsearchDataStore. I'm still new to Elasticsearch, and I'm still evaluating the use cases of using it, but the filter dialect ES provides is more complex(filters are represented as a JSON payload in the GET request), and I still need to familiarize myself on typical cases of filtering/searching. If common cases can be covered by Elide's filter expressions, then we might just need to translate the Elide filter expressions to Elasticsearch filter dialect. Or maybe we should have a ElasticsearchFilterDialect impl in Elide, but that sounds a lot of design to me. When I have a clearer picture, I may draft something here.

The more I think about it, the more I start to consider my use case of Elide as a hub service that connect multiple services together: When the main datastore(typically HibernateDataStore) loads some attributes/relationships, it could decide where to source certain data from(e.g. from another database) through MultiplexManager; when it create and save something, it could decide what else should be done(e.g. index to Elasticsearch); all with JPA models as the representation. I'm not sure if I'm thinking it the right way. Any thoughts are welcomed.

xiaoyao1991 avatar Jun 28 '16 04:06 xiaoyao1991