Skip to content

NPE when trying to remove stopwords when creating a collection. #543

@SimeonEvorra

Description

@SimeonEvorra

Hello

I need to remove some stopwords but got the following error (on the 6.1.0)

java.lang.NullPointerException: Cannot invoke "java.util.List.addAll(java.util.Collection)" because "this.removals" is null
	at io.weaviate.client6.v1.api.collections.InvertedIndex$Stopwords$Builder.remove(InvertedIndex.java:122)
	at io.weaviate.client6.v1.api.collections.InvertedIndex$Stopwords$Builder.remove(InvertedIndex.java:117)

Here is a code sample to reproduce:

var test = weaviateClient.collections.create("TestCollection",
         col -> col.properties(Property.text("test", p -> p.vectorizePropertyName(false)))
            .vectorConfig(VectorConfig.text2vecOpenAi(cfg -> cfg.model("ada")))
            .invertedIndex(inv -> inv.stopwords(sw -> sw.remove("it"))));

Or is my approach incorrect and that's not the way to remove stopwords?

Thank you

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions