Why Richtext content is not searchable in hygraph/graphcms?

78 views Asked by At

Im try to search content from the query user requested but hygraph not showing the result it only show data if title contains it...

export async function getServerSideProps(context) {
const { query } = context;
const { posts } = await hygraph.request(
    `
      query BlogPostPage($search: String! ){
            posts(where:{_search: $search}){
            createdAt
            id
            slug
            titile
            coverPhoto {
                url
            }
            content {
                html
            }
            author {
                name
                avtar {
                url
                }
            }
        }
      }
    `,
    { search: query.q }
);

return {
    props: {
        posts,
    },
};

}

i want this search query search the query from all the field how to do that ?

1

There are 1 answers

0
Bikappa On

Hygraph currently does not support full text search. From the documentation https://hygraph.com/docs/guides/content/searching-for-content

Hygraph does not support Full Text Search currently. Rich Text or JSON is currently not supported. Also, it’s not possible to filter or search for references (content relations), multi-value fields, colors as well as coordinates.