#general

Issues with Updating Analyzer for Existing Index

TLDR s.p.cherkasov encountered an error while updating analyzer for an existing index using Zincsearch API. Hengfei confirmed it's a part of the API design and suggested creating an issue for this.

Powered by Struct AI
7
3mo
Solved
Join the chat
Aug 31, 2023 (3 months ago)
s.p.cherkasov
Photo of md5-0ca37054c6c9042aa04fcfb92cc7d99c
s.p.cherkasov
10:05 AM
curl -X 'PUT' \
  '' \
  -H 'accept: application/json' \
  -H 'authorization: Basic YWRtaW46Q29tcGxleHBhc3MjMTIz' \
  -H 'Content-Type: application/json' \
  -d '{
        "analyzer" : {
        "web" : {
          "tokenizer" : "web"
        }
      }
    }'
s.p.cherkasov
Photo of md5-0ca37054c6c9042aa04fcfb92cc7d99c
s.p.cherkasov
10:10 AM
If you try the example from the documentation, then the error is
10:10
s.p.cherkasov
10:10 AM
{
  "error": "can't update analyzer for existing index"
}
Hengfei
Photo of md5-c30bb074b7d997d2cd6e689678b65dc1
Hengfei
10:20 AM
so, yes, the api design like this. maybe you can create an issue for this, let's check if we can change the implement.
10:20
Hengfei
10:20 AM
but you can set the analyzer when you create index.