chroma
                                
                                 chroma copied to clipboard
                                
                                    chroma copied to clipboard
                            
                            
                            
                        [Feature Request]: Support metadata boolean filtering
What happened?
data = collection.get(where={"is_feature": True}) print (len(data['documents'])) i = 0 for result in data['metadatas']: print (result['is_feature'])
i have a "is_feature" value in my metadata which is either True or False as boolean. the filter just doest not work.. which means i am getting all documents from the collection..
cheers Alex
Versions
chromdab 0.3.21 python 3.10.6 ubuntu
Relevant log output
No response
Hi ! Technically speaking, boolean filtering is not supported. The supported types are str, int, float.
https://github.com/chroma-core/chroma/blob/25e2cffbfe547cc044186d4d5f4b659878a53e43/chromadb/api/types.py#L24
Could you try casting your data and using that? (i.e maybe use 0/1 for false/true)
I will turn this issue into a feature request as we 100% should support this! Thanks :)
This should be addressed by #866