Near text search over one specific field

Hey, i am trying to use the near text query to search for related Discussions in my Database. I want to add specific search only for the name or for the content of the Discussion. Unfortunately, I haven’t been able to figure out an way to do this.

Can anyone help?

My current query:

near_text = { 
     "concepts": text.strip(), 
     "certainty": 0.65, 
 result = ( 
     .get("Discussion", ["name", "vanilla_url"]) 

Thanks :pray:

Hi @kaahila - nearText works by finding similar vectors to the object. So once the vector has been built, you won’t then be able to restrict it to the name property only.

Perhaps a hybrid search might work if word match + vector search is what you’re after?

1 Like

Thanks for your answer. I have decided to differentiate the search depending on the data passed. It has become a mixture of nearText, hybrid and nearObject.

1 Like