Quantcast
Channel: Weaviate Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 3590

Getting “nested query: nested clause at pos 1: invalid search term, only stopwords provided. Stopwords can be configured in class.invertedIndexConfig.stopwords” when conditional filter has an input of single or double quotes

$
0
0

hi @junbetterway !! Long time no see :slight_smile:

I was not able to reproduce this on 1.26.1 nor on 1.23.7

Please, check if my code is what you are doing:

client.collections.delete("Test")
collection = client.collections.create(
    "Test",
    vectorizer_config=wvc.config.Configure.Vectorizer.none(),
    properties=[
        wvc.config.Property(
            name="name", data_type=wvc.config.DataType.TEXT
        ),        
        wvc.config.Property(
            name="skills", data_type=wvc.config.DataType.TEXT_ARRAY
        ),
    ],
    inverted_index_config=wvc.config.Configure.inverted_index(
        stopwords_removals=["it"],
        stopwords_preset=wvc.config.StopwordsPreset.EN
    )
)
collection.data.insert({"name": "skill set 1", "skills": ["account", "hr", "sales"]})
collection.data.insert({"name": "skill set 2", "skills": ["engineering", "sales", "finance"]})
collection.data.insert({"name": "skill set 3", "skills": ["it", "training", "other"]})
collection.data.insert({"name": "skill set 3", "skills": ["'it'", "training", "other"]})

Now I can search:

for o in collection.query.fetch_objects(
    filters=wvc.query.Filter.by_property("skills").contains_any(["it"])
).objects:
    print(o.properties)

those are the versions used:

print(weaviate.__version__, "/", client.get_meta().get("version"))
# client version / server version
>>> 4.7.1 / 1.26.1

Let me know what we can do in this code to try replicating this issue.

THanks!


Viewing all articles
Browse latest Browse all 3590

Trending Articles