Jump to content

Reindexing Deleting OpenSearch Index


Recommended Posts

I just installed OpenSearch and stock 4.7.3 on my beta server. I created an index via command line on the server, then create a document in IPS. I see the index shows 1 document after this. My search turns up nothing. So I reindex via AdminCP. Then the index disappears. When I query for indices via command line, it isn't listed anymore. 

Anyone else see this?

Edited by Chris027
Link to comment
Share on other sites

That's correct. Reindexing the search index will truncate the old one, before the process starts to create the new records.

You should see the progress on the ACP Dashboard page. Is it progressing? Are you able to run it manually? If yes, do you see any errors there? If no, could you check if you're see now anything in the index via CLI?

Link to comment
Share on other sites

3 minutes ago, Daniel F said:

That's correct. Reindexing the search index will truncate the old one, before the process starts to create the new records.

You should see the progress on the ACP Dashboard page. Is it progressing? Are you able to run it manually? If yes, do you see any errors there? If no, could you check if you're see now anything in the index via CLI?

Before I reindex via AdminCP it looks like this

 curl -XGET 'localhost:9200/_cat/indices?v'
health status index    uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   .tasks   6yEl4oDsRO-NnR7iQnA8Jw   1   0          4            0     24.9kb         24.9kb
yellow open   myindex  0i_d_zNrT2GFuUvp_m2fYQ   1   1          1            0       208b           208b

 

After I reindex in the AdminCP it looks like this

curl -XGET 'localhost:9200/_cat/indices?v'
health status index  uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   .tasks 6yEl4oDsRO-NnR7iQnA8Jw   1   0          4            0     24.9kb         24.9kb


 

The index named myindex is totally gone. It only had one article in it, and the reindex took about 10 seconds in the AdminCP. It finished quickly. I also did this and clicked "run manually" with the same result. 

Link to comment
Share on other sites

I'm doing more testing. Found something else strange. 

I switch search in AdminCP to MySQL and save it.

Created a new index via command line in open search.

switched search in AdminCP to use OpenSearch and selected the newly created index. 

Index was removed (seen via command line) as soon as I clicked save in AdminCP.

Link to comment
Share on other sites

I guess I'm trying to figure out if this is my own issue I created, or if IPS is somehow deleting the index. Here is what I'm doing. 

curl -XPUT 'localhost:9200/myindex?pretty'
{
  "acknowledged" : true,
  "shards_acknowledged" : true,
  "index" : "myindex"
}


curl -XGET 'http://localhost:9200/myindex?pretty'
{
  "myindex" : {
    "aliases" : { },
    "mappings" : { },
    "settings" : {
      "index" : {
        "creation_date" : "1665603517192",
        "number_of_shards" : "1",
        "number_of_replicas" : "1",
        "uuid" : "0FSaTywWTgSrGxOivBNWKw",
        "version" : {
          "created" : "136227827"
        },
        "provided_name" : "myindex"
      }
    }
  }
}


curl -XGET 'localhost:9200/_cat/indices?v'
health status index   uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   myindex 0FSaTywWTgSrGxOivBNWKw   1   1          0            0       208b           208b
green  open   .tasks  6yEl4oDsRO-NnR7iQnA8Jw   1   0          6            0     40.5kb         40.5kb

 

In the above I creates the index, checked its status and the status of all indices. The newly created index shows health as yellow because it's new (I'm guessing). 

Then I switched from MySQL to Elastic / OpenSearch.

 

Could contain: Text

 

Could contain: File, Text, Page, Document, Webpage

 

 

Then I checked on the status of all indices, and "myindex" is gone.

 

curl -XGET 'localhost:9200/_cat/indices?v'
health status index  uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   .tasks 6yEl4oDsRO-NnR7iQnA8Jw   1   0          6            0     40.5kb         40.5kb

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

  • 8 months later...
[2023-07-04T16:42:25,544][INFO ][o.o.c.m.MetadataDeleteIndexService] [e14911be311d] [content/YyPDIyO8TqCQgJPetdn7UA] deleting index
[2023-07-04T16:42:25,582][INFO ][o.o.a.u.d.DestinationMigrationCoordinator] [e14911be311d] Detected cluster change event for destination migration
[2023-07-04T16:42:25,583][ERROR][o.o.i.i.ManagedIndexCoordinator] [e14911be311d] get managed-index failed: [.opendistro-ism-config] IndexNotFoundException[no such index [.opendistro-ism-config]]

Definitely broken, tried opensearch 2.0.1 and 2.1.0. When rebuilding, the index is deleted and not re-created.
Tried elasticsearch 7.17.10 and it works fine.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...