2

I'm new to elastic search however had to work with it. I have successfully set it up using logstash to connect it to my oracle database(one particular table). Now if new records are added to one of the tables in my oracle database(which I built the index on), what should be done? I have thought of two solutions,

  1. Re-build the indices by running the logstash conf file.
  2. On insert into the table, also POST to elastic search.

The first solution is not working like it should. I mean that if 'users' is the table that I have updated with new records, then on re-building indices(for the 'users' table) in elastic search, the new records also should be reflected in the logstash get query.

The first should would help as a POC.

So, Any help is appreciated.

Eswar
  • 1,201
  • 19
  • 45
  • 1
    these answers should help: https://stackoverflow.com/questions/34477095/elasticsearch-replication-of-other-system-data/34477639#34477639 + https://stackoverflow.com/a/40365180/4604579 – Val Jun 20 '19 at 06:45
  • @Val Thank you for the pointing to the right direction but I'm looking for brute force method to work. The old and the new records must be reflected in the elastic search. Can you pin-point any possible reasons for it to fail? – Eswar Jun 20 '19 at 07:03
  • You'll need to provide more info as to why the second (the right one) solution doesn't work. Maybe show your Logstash configuration, too – Val Jun 20 '19 at 07:05
  • @Val the second one should work but we need the first one to work as a POC. The error says unable to update the index because of more than 1 type mapping – Eswar Jun 20 '19 at 07:09
  • 1
    I shared most of my thoughts here http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/ (in case it helps). – dadoonet Jun 20 '19 at 07:27

1 Answers1

1

Thank you Val for pointing me in the right direction.

However, for the first brute-force solution it was about changing the document type in the logstash conf file.

{"document_type":"same_type"}

This must be consistent with the previously mentioned type. I had run it with different type, first time(Same_type). After adding new records, I used same_type. So, the elastic search as thrown an exception for multiple mapping rejection.

For further clarification, it looked up here.

Thank you guys.

Eswar
  • 1,201
  • 19
  • 45