OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

Getting redundant results in explore page

Open darth-coder00 opened this issue 5 years ago • 4 comments

Run ingestion for

metadata ingest -c ./pipelines/sample_tables.json
metadata ingest -c ./pipelines/sample_usage.json
metadata ingest -c ./pipelines/sample_users.json
metadata ingest -c ./pipelines/sample_topics.json

And run ingestion for elastic search

metadata ingest -c ./pipelines/metadata_to_es.json

Getting 18 KAFKA topics instead of 6 and multiple entries of same dataset in suggestions/search results

Refer screenshots:

Screenshot 2021-08-26 at 5 30 52 PM Screenshot 2021-08-26 at 5 30 11 PM Screenshot 2021-08-26 at 5 35 41 PM

darth-coder00 avatar Aug 26 '21 12:08 darth-coder00

@darth-coder00 this will happen if you delete the MySQL DB but didn't delete the elastic search index. try running the following command in terminal curl -XDELETE http://localhost:9200/table_search_index

sureshms avatar Aug 26 '21 22:08 sureshms

@sureshms i tried this command but getting an error like this

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The provided expression [table_search_index] matches an alias, specify the corresponding concrete indices instead."}],"type":"illegal_argument_exception","reason":"The provided expression [table_search_index] matches an alias, specify the corresponding concrete indices instead."},"status":400}

Sachin-chaurasiya avatar Aug 27 '21 03:08 Sachin-chaurasiya

we moved ElasticSearch from bulk operations to a per event and elastic search documents will have id that will match to the openmetadata mysql storage UUIDs. example

  1. TableA in MySQL will have ID 1 and the elastic search will use that ID to associate TableA in elasticsearch index
  2. This will allow us to update the elastic search document directly whenever there are updates from users are ingestion
  3. periodically one can choose to run the metadata elastic search ingestion to re-index all the documents incase if we lose any actions in step-2

Currently, the above issue happens

  1. when the user runs ./bootstrap-storage.sh drop-create and re-ingests data. This means TableA will get a new ID let's say and elastic search existing indexes are not deleted. When the indexing happens it will create a TableA with ID 11 and elaticsearch will have TableA ID 1, so it will be treated as a new document and creates another TableA doc in the index.
  2. curl -XDELETE http://localhost:9200/table_search_index and curl -XDELETE http://localhost:9200/topic_search_index to clear out old indexes whenever they run drop-create
  3. We are looking alternate ways with @ayush-shah to resolve this with-in index phase

sureshms avatar Aug 27 '21 05:08 sureshms

Closing the issue as discussed, drop-create will only be for developer usage. As to when drop-create is done, the user will have delete the indexes

curl -XDELETE http://localhost:9200/table_search_index and curl -XDELETE http://localhost:9200/topic_search_index to clear out old indexes whenever they run drop-create

ayush-shah avatar Oct 20 '21 04:10 ayush-shah