weaviate icon indicating copy to clipboard operation
weaviate copied to clipboard

Showing a vector of a reference returns null

Open bobvanluijt opened this issue 3 years ago • 6 comments

E.g.,

{
  Get {
    Article(limit: 1) {
      title
      hasParagraphs {
        ... on Paragraph {
          order
          content
          _additional {
            vector
          }
        }
      }
    }
  }
}

returns

{
  "data": {
    "Get": {
      "Article": [
        {
          "hasParagraphs": [
            {
              "_additional": null,
              "content": "Asociación Alumni, usually just Alumni, is an Argentine rugby union club located in Tortuguitas, Greater Buenos Aires. The senior squad currently competes at Top 12, the first division of the Unión de Rugby de Buenos Aires league system. The club has ties with former football club Alumni because both were established by Buenos Aires English High School students.La historia de Alumni: un club que respira rugby y está unido a la primera leyenda del fútbol argentino by Walter Raiño on Clarín, 26 Nov 2018 ",
              "order": 0
            },
etc...

PS: I've validated that the crefs actually have vectors ;-)

bobvanluijt avatar Oct 22 '21 20:10 bobvanluijt

It's a graph-QL issue. Additional properties other than id don't actually exist on references currently, but in GraphQL we cannot show a different _additional based on whether the class is used at the root level or in a reference.

That said, I think we could probably add vector to also work on referenced classes as well. But the current state is basically "the feature doesn't exist, it only looks like it because of GraphQL"

etiennedi avatar Oct 27 '21 08:10 etiennedi

Aha - are we talking about a difficult feature to add here?

bobvanluijt avatar Oct 27 '21 14:10 bobvanluijt

I have this problem too. Is it possible to fix this? I can't image that GraphQL ist the limitation.

danieldaeschle avatar Jul 18 '22 14:07 danieldaeschle

I have this problem too. Is it possible to fix this? I can't image that GraphQL ist the limitation.

This should absolutely be possible to fix. My statement above is a bit misleading, I didn't mean that GraphQL was the limitation. What I meant more was: We never added support for _additional{} properties in resolved references, but because the GraphQL type is the same type as the root type it contains _additional{} in the GraphQL schema even without us adding an implementation for it.

etiennedi avatar Jul 19 '22 07:07 etiennedi

I've added a good-first-issue label, maybe someone wants to make their first contribution to Weaviate :-)

etiennedi avatar Jul 19 '22 07:07 etiennedi

I would like to fix it but I has no starting point where the _additional things are implemented. Also I'm on a windows machine. I think it does not run on that, right?

danieldaeschle avatar Jul 19 '22 08:07 danieldaeschle

Closing as this has been fixed.

etiennedi avatar Dec 23 '22 10:12 etiennedi