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

[Question] How to retrieve all documents in weaviate?

$
0
0

Hi, @DudaNogueira!
Thanks for your quick reply!

Sorry, I think I might lose that document on your guide page.

Honestly, I do really find that you release v4 version. But I build a knowledge platform in my company based on v3 version early last year. So it might took quite much time to transfer to new v4 version… :melting_face:

In fact, I still have one question, hope you don’t mind I ask in this page.

About my knowledge platform mentioned above, I should build a delete function for user to delete what they uploaded before. I use with_where to filter those data in weaviate , but I find
Equal operator doesn’t return precise result for me.

For example, I want to filter source == '請假.txt', but it will return source == 請假.txt and source == 請假_53.txt. So I need to add filter rule by myself.

import weaviate
class_name= 'TEST'
client=weaviate.Client(weaviate_url)
doc_name='請假.txt'     
response = (
    client.query.get(class_name, properties=["_additional {id}", "source"])
    .with_where({
        "path": ["source"],
        "operator": "Equal",
        "valueString": doc_name
    })  
).with_limit(20000).do()

source_set = set([item['source'] for item in response['data']['Get'][class_name]])
print(source_set)
# {'請假.txt', '請假_53.txt'} ->  I hope it should only be '請假.txt'

Is it a right behavior for Equal operator ? Or it is some bug for Chinese file_name?

Thanks!!


Viewing all articles
Browse latest Browse all 3605

Trending Articles