Using moveTo or moveAwayFrom on a withHybrid query

Just wonder if it’s possible to use moveTo or moveAway from on a withHybrid query. I asked the Verba app you all made and it said:
I asked if I could use moveTo with a withHybrid query and it said:

Yes, you can use moveTo and moveAwayFrom in a withHybrid query as these parameters are part of the nearText functionality which can be used within a withHybrid query

which is exactly what I want to do. Trying to implement the snippet however, I get the following error:

ClientError: Syntax Error GraphQL request (1:28) Expected Name, found String "concepts"

1: {Get{Offers(hybrid:{query:{"concepts":"Target","certainty":0.7,"moveTo":{"concepts":["Merchandise"],"force":0.85}},alpha:0.9},limit:3,tenant:"dDYHM5PfD72iFRnvbQXRcvlMGtXyxmAC"){offer, keywords _additional {score}}}}

Here is my code snippet where i compose the query:

   const near_text_filter = {
            concepts: [concepts],
            certainty: 0.7,
            moveTo: {
              concepts: [categorylabel],
              force: 0.85,
            },
          };
          const hybrid_query = {
            query: near_text_filter,
            alpha: 0.8
          }
          await client.graphql
            .get()
            .withClassName("Offers")
            .withFields(`offer, keywords _additional {score}`)
            .withTenant(client_id)
            .withHybrid(hybrid_query)
            .withLimit(3)
            .do()

Is it hallucinating or am I doing something wrong?

I just found how to weight/boost searched properties. That should fit my use case well enough.

1 Like

Hi @adam - yeah your suspicions are correct :sweat_smile:. Hybrid search does not support moveto, unfortunately.

If you would like, please feel free to open a feature request on our GitHub repo :slight_smile: