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
andmoveAwayFrom
in awithHybrid
query as these parameters are part of thenearText
functionality which can be used within awithHybrid
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?