Server Unavailable and Schema Error

Created on 8 August 2024, 3 months ago
Updated 2 September 2024, 2 months ago

Problem/Motivation

I am setting up a Drupal 10 site to demonstrate ways to use search. I am eager to try out Typesense. I have used Algolia, so I have an idea of how to set up search.

The first error was regarding the server. I am using the Typesense Cloud. The screenshot shows that the server is unavailable. I typed in the API key and the host from the Typesense cluster.

I set up an index and added some field. It suggested that I add a field to the Schema. Even when I tried adding a numeric field, the field did not show up as an option in Schema. I could not select a field. I saved the index and tried to index my content. I got errors regarding schema:
Error: Call to a member function getSchema() on null in Drupal\search_api_typesense\Plugin\search_api\backend\SearchApiTypesenseBackend->getSchema() (line 186 of modules/contrib/search_api_typesense/src/Plugin/search_api/backend/SearchApiTypesenseBackend.php).

Steps to reproduce

  1. Enable the search_api_typesense module.
  2. Add a server with Typesense information
  3. Add an index and fields such as title, rendered_html, and one numeric field.
  4. Click on Schema to see if one can add the numeric field
  5. Try indexing the content.
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States leoraw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @leoraw
  • Status changed to Postponed: needs info 3 months ago
  • 🇮🇹Italy lussoluca Italy

    I've just tried using Typesense Cloud, and it worked as expected.

    I suppose there are some issues with documentation/UX that we can improve on.

    Have you set the type of the fields as Typesense: ... ?

  • 🇺🇸United States leoraw

    Thank you for the screenshot! No, I did not know that I needed to set the type of fields as Typesense. Yes, better documentation would help.

  • Status changed to Fixed 3 months ago
  • 🇮🇹Italy lussoluca Italy

    While working on Expand documentation (was "Doubts about the installation") Needs work , I've made the code more robust for this kind of issue.

  • 🇺🇸United States leoraw

    I figured out how to set the fields as Typesense. First, one has to add the fields at the Fields tab. Then there is a table that shows the Type. In that dropdown, one can choose instead the Typesense fields. I don't see one for Fulltext. Wondering if Typesense string[] will work.

    I added a fake field_sorter and gave it the default of zero for the number field wanted by the Schema tab.

    Unfortunately, it says that the Server is Unavailable, so I cannot do any more now. Will try again another day.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024