contentful.js icon indicating copy to clipboard operation
contentful.js copied to clipboard

A bug about Full-text search on a field

Open cityvoice opened this issue 5 years ago • 3 comments

  • Package Version: 7.14.4
  • Which API are you using?: Delivery

Full-text search on a field only matches the fields which value start with query string, examplce code:

    client.getEntries(
      {
        'content_type': 'article',
        'fields.title[match]': 'contentful'
      })

It only matches the records like:

    {
        fields:{
          title:'contentful xxxxxx'
        }
    }

not:

    {
        fields:{
          title:'xxxxxx contentful xxxxxx'
        }
    }

just like match ^content.

cityvoice avatar May 03 '20 03:05 cityvoice

bump ^ same issue

llwor94 avatar Jun 16 '20 21:06 llwor94

I had this exact same problem, so I opened a support ticket with the Contentful guys and they told me that it's a bug in their documentation. Their "full text search" is not "full text search".

In their own words it is "anchored search to the beginning of the string", or in more common terms "starts with, search".

Cyberlane avatar Jan 05 '21 08:01 Cyberlane

Awful. This is a deal-breaker if you expect decent searching.

lmf-git avatar Sep 01 '21 22:09 lmf-git

closing the issue, if you still need help with this please reach out to Contentful support

mayakarabula avatar Jun 13 '23 14:06 mayakarabula