typesense / typesense-instantsearch-adapter

A JS adapter library to build rich search interfaces with Typesense and InstantSearch.js
MIT License
402 stars 63 forks source link

Make host/port/protocol in nodes[] optional if url provided #159

Closed carderne closed 1 year ago

carderne commented 1 year ago

Description

If url is provided, protocol, host, port and path aren't needed. They are passed to this code in typesense-js.

Steps to reproduce

  const typesenseInstantSearchAdapter = new TypesenseInstantSearchAdapter({
    server: {
      nodes: [
        {
          url: "http://localhost:8108",
          host: "",
          port: 0,
          protocol: "",
        },
      ],
...

Expected Behavior

This code works. The types just need updating.

Metadata

Typesense Version: 1.5.2

jasonbosco commented 1 year ago

Could you try this out in 2.7.0-4 and let me know?

carderne commented 1 year ago

Works, thanks.