geraldhumphries / generator-jhipster-elasticsearch-reindexer

A JHipster module that inserts all your data into Elasticsearch and helps solve mapping and maintenance issues.
Other
45 stars 22 forks source link

add reference table in to elastic search #41

Closed 19031987 closed 6 years ago

19031987 commented 6 years ago

Hello ,

Could you please let me know how can I add reference data into elastic search using re indexing and these are not part of jhipster table, could you please suggest me what can be done in those cases

geraldhumphries commented 6 years ago

Hi, I don't understand what you are asking. What do you mean by "reference data", where is this data coming from, and what do you mean it isn't part of JHipster tables? What is the goal?

19031987 commented 6 years ago

What do you mean by "reference data", reference data --> Source data from where I get the data , do some manipulation and dump the data into jhipster entity table.

where is this data coming from, I am manually dumping the data into myql using tool.

what do you mean it isn't part of JHipster tables? I am not creating any entity using Jhipster, because I using them as source data but want to include in elastic search.

What is the goal? Wanted to push source data /reference data into elastic search

geraldhumphries commented 6 years ago

If you have JHipster entities/tables for the data you're trying to dump into Elasticsearch, and all of the data has already been inserted into the JHipster entity tables, then this should work fine. What is the problem you are having with it?

19031987 commented 6 years ago

my issue is tables are not part of jhipster ,but I have it in my database which I want to dump into elastic search.

geraldhumphries commented 6 years ago

Oh, I see your problem.

This module relies on your entities being defined in JHipster. Without that, you have a couple of options:

  1. Simply add the lines to reindex them manually. This is easy, but any changes you make will be overwritten next time you regenerate the reindexing classes using this module.

  2. Add JSON files for your entities in the .jhipster folder but don't actually run JHipster for them. This module will be able to generate the lines to reindex them.

In both cases you'll need at least an entity, repository, and elasticsearch repository for each of the entities you want to create an elasticsearch index for. If you do not want to include these tables as entities in your application at all, then you will need to find a different solution to index them.

I am closing because this question is more suitable for Stack Overflow than GitHub.