CRUD App Search via API using Python Client

Hello,

I have a problem where the data I've ingested, one of the attribute column is a wrong data.

The data ingested is around 200k+ documents.

I'm trying to update the whole data by API by following this documentation :

But I'm stuck at Authenticating with App Search.

The error I've got is this :

Appreciate if anyone could help me with this, thank you.

Hi @aisyaharifin !

The documentation is incorrect, we'll make sure to change that.

Please try the following:

# Creating a Signed Search Key on the server side...
signed_search_key = server_side.create_signed_search_key(
    api_key="<private api key value>",
    api_key_name="<private api key name>",
    search_fields={
        "body": {}
    }
)

You will need to get the private API key included in your deployment, or create a new one to fill out the key name and value.

Hope that helps!

Hi @Carlos_D ,

Thank you for your reply.

I've already tried and it works but then I couldn't do any request.

So I've tried to directly connect to App Search by using this reference :

It seems like the http_auth is not working so I've tried used the bearer_auth, but then I still couldn't do any request.


My main problem now is the data I've ingested, one of the attribute column is a wrong data.

The data ingested is around 200k+ documents.

Do you have any workaround option on how can I fix the wrong data by updating the new one?

Currently I've been trying to do it through API, but it seems like the documentation is wrong?

Do you have any proper guideline for me?

Thank you, truly appreciate your help.

Hi @aisyaharifin :

A 403 error means that you don't have permissions. Have you checked that the API key value is correct? You should be able to use bearer_auth with the private API key value. There is a private API key defined by default, and you can create a new one.

Can you please include the python code you're using for connecting?

Regarding your main problem, do you need to update a single field for your documents? In that case, you could use a partial update to just update the field you need.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.