Giter Club home page Giter Club logo

Comments (7)

tsmith023 avatar tsmith023 commented on May 26, 2024 1

Ah, I see what you're driving at! I can reproduce the problem and will look into it. Thanks for raising it 😁

from weaviate.

tsmith023 avatar tsmith023 commented on May 26, 2024 1

This has been fixed and merged into stable/v1.23 meaning that it will land in the next patch release.

I will leave the issue open until then. For now, you can unblock yourself by using this image in your local environment: preview-map-correct-dtype-when-filtering-references-by-count-b6ff4ab

from weaviate.

etiennedi avatar etiennedi commented on May 26, 2024 1

Closing as complete based on the statements above.

from weaviate.

tsmith023 avatar tsmith023 commented on May 26, 2024

Hi @SavvasMohito, the v4 Python client doesn't use GQL under-the-hood but instead gRPC so they can't be compared.

However, the origin of your problem with the v4 client is due to the way reference filters must be constructed if using the Filter([prop, target, ref_prop]) syntax. With the latest beta release, the filtering syntax has been streamlined so you should be able to perform your query much more easily if you upgrade your client version!

Cheers 😁

from weaviate.

SavvasMohito avatar SavvasMohito commented on May 26, 2024

Hi @tsmith023, thanks for your reply. I just tried the latest beta version but am still facing the same issue. The thing is that I am not trying to apply a filter on a value of the cross-reference, I am trying to filter the number of entries a cross-reference has in an object. For example, in my case, I am trying to query GTR_project objects that have at least one occurrence of GTR_spinOut cross-reference (under the hasSpinOut property). And even though I am using an integer filter, the error message that only valueInt filters can be used for what I want to do.

from weaviate.

SavvasMohito avatar SavvasMohito commented on May 26, 2024

I think this is the part of weaviate throwing the error, if it helps:

if schema.IsRefDataType(prop.DataType) {
// bit of an edge case, directly on refs (i.e. not on a primitive prop of a
// ref) we only allow valueInt which is what's used to count references
if cw.isType(schema.DataTypeInt) {
return nil
}
return errors.Errorf("Property %q is a ref prop to the class %q. Only "+
"\"valueInt\" can be used on a ref prop directly to count the number of refs. "+
"Or did you mean to filter on a primitive prop of the referenced class? "+
"In this case make sure your path contains 3 elements in the form of "+
"[<propName>, <ClassNameOfReferencedClass>, <primitvePropOnClass>]",
propName, prop.DataType[0])

from weaviate.

SavvasMohito avatar SavvasMohito commented on May 26, 2024

I appreciate your help @tsmith023. Have a nice day!

from weaviate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.