Modify Indices after Schema Creation

Description

I have a collection, this collection has some fields which should have been made indexes. Now i want to query over these fields with filters, below is the sample code:

filter = wvc.query.Filter.by_property('loc').equal('london')
result = weaviateQuerier(class_name='XXXXX',
                         filters=filter,
                         topk=1000,
                         query_vector=dummyVector2,
                         include_metadata=True)
result

this is the error i get :

WeaviateQueryError: Query call with protocol GRPC search failed with message explorer: get class: vector search: object vector search at index ‘XXXXXX’ shard ‘xxxxxx’_SwOVo2TQ8g38: build inverted filter allow list: nested query: nested clause at pos 1: Filtering by property ‘loc’ requires inverted index. Is indexFilterable option of property ‘loc’ enabled? Set it to true or leave empty.

Is there any way i can “set” these filters after schema creation (is that what error meant)?

I am new to weaviate, sorry if this is already answered somewhere, the closest answer i looked at was :
Property Modification, but seeing this error, just wanted to make sure if its the case.

Server Setup Information

  • Weaviate Server Version: 1.23.7
  • Deployment Method: docker
  • Client Language and Version: Python, Weaviate V4
    Thanks !

You have to update the class property: REST - /v1/schema | Weaviate - Vector Database

Oops, my bad. I always think you can do that, but you can’t.

Currently, this is the solution: Can I update the property of a class schema? - #2 by DudaNogueira

However, if you’re like me and have a copy of all of our data in a separate database, you could just delete the current class, create a new one with the necessary changes, then re-embed your data.

I have yet to try and migrate so don’t know how well that works.

1 Like

thanks, i looked at that thread few days ago, its just that the error is worded in a way which made me think it could be done ( was happy for a sec lol).
I guess we have to dump it again :slight_smile: