weaviate-ruby icon indicating copy to clipboard operation
weaviate-ruby copied to clipboard

Does it supports query using distance or certainty?

Open ccokme opened this issue 2 years ago • 1 comments

If not, is there a roadmap to implement this? Thanks!

ccokme avatar Jan 20 '24 06:01 ccokme

@ccokme Yeah, you should be able to pass distance and/or certainty.

Have you looked at the example using the Get{} GraphQL endpoint?

If you look at the example from the docs:

{
  Get{
    JeopardyQuestion(
      nearText: {
        concepts: ["animals"],
        distance: 0.2
      }
      ...

You should be able to do something like:

near_text = '{ concepts: ["biology"], distance: "...", certainty: "..." }'

client.query.get(
    class_name: '...',
    near_text: near_text
    ...
)

andreibondarev avatar Jan 20 '24 19:01 andreibondarev