graphaware / neo4j-to-elasticsearch

GraphAware Framework Module for Integrating Neo4j with Elasticsearch
261 stars 57 forks source link

Plugin is not responsive until indexation is finished #86

Closed davidrapin closed 7 years ago

davidrapin commented 7 years ago

The  start method in ElasticSearchModule is synchronously waiting for  reindex to be done before returning. While start has not returned, the Cypher extensions (ga.es.initialized,  ga.es.queryNode etc.) are not registered, i.e. calling them will trigger an error. This means that, when indexing a big database, the plugin will be in an semi-initialized state during the whole duration of the initial indexation.

Proposal: reindex should be async, and be run in a different thread to avoid blocking start from returning.