Bug? GraphQL fulltext search on specific field returning unexpected results

I think I've perhaps found a bug in the GraphQL API.

Full text search on a specific field in GraphQL is returning unexpected results, seemingly where the search term hits for another text field but not the queried field. For example, the following query for "the" in the "title" field will return results where "the" is NOT in the title, but appears in other document fields.

query TextSearchTest {
  allBlog_posts(lang: "en-us", where:{title_fulltext:"the"}) {
   edges{
      node{
        title
      }
    }
  }
}

Returns results similar to:

{
  "data": {
    "allBlog_posts": {
      "edges": [
        {
          "node": {
            "title": "This is a bad hit"
          }
        },
        {
          "node": {
            "title": "And so is this one"
          }
        },
      ]
    }
  }
}

Am I missing something, or is this indeed a bug?

Thanks for the heads up about this error and for sharing your use case with us.

I've shared this with the team. They'll review it as soon as possible

Thanks

Hey @jeremy2, I received a response from the dev team. They've explained that the fulltext search is not an exact term search. The search engine will stripe out all terms like "the", "a", "it", "she", and keep only what it considers as relevant words.

For the moment there isn’t any sort of workaround for this. The only option to get more specific results would be to use a third-party search service such as Algolia.

Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.