              const searchResults = await index.search(query, {
                        limit: hitsPerPage,
                        offset: currentPage * hitsPerPage,
                        attributesToHighlight: ["title", "content"],
                        highlightPreTag: '<span class="highlight">',
                        highlightPostTag: "</span>",
                        attributesToCrop: ["content"],
                        cropLength: 200,
                        attributesToRetrieve: [
          