TLDR Karthik wanted to change the path in Typesense server config. Jason suggested updating the nodes and using Nginx reverse proxy for the desired configuration.
You can update the nodes config to this: ```nodes: [ { host: "localhost", path: "/typesense", port: 8108, protocol: "http", },```
after adding the prop path I am getting an error - 400 { "message": "Not Found"}
Could you look at the browser’s network inspector and share the actual path being generated?
Wait do you already have Typesense running behind `
I am trying on my local system Linux, and also 8108 port is running on my system
See our previous thread about first running Typesense on that path via a reverse proxy:
Only once you have that working, will changing the config in the adapter work
Ok
I will try to repopulate the data with new configuration using typesense npm
Jason how can I add a path to the typesense server configuration
Typesense does not support this natively
So it will only listen to the root path
You have to put nginx in front of Typesense if you want to serve from a sub-path
Karthik
Wed, 22 Mar 2023 15:19:16 UTCJason, Is there any way to change the path from this to `` this ``
```import TypesenseInstantsearchAdapter from "typesense-instantsearch-adapter";
let TYPESENSE_SERVER_CONFIG = {
apiKey: "xyz",
nodes: [
{
host: "localhost",
port: 8108,
protocol: "http",
},
],
connectionTimeoutSeconds: 1,
numRetries: 8,
};
export const typesenseAdapter = new TypesenseInstantsearchAdapter({
server: TYPESENSE_SERVER_CONFIG,
additionalSearchParameters: {
query_by: "CAS_ID,Synonyms,Molecular_Weight",
queryByWeights: "4,2,2",
numTypos: 3,
typoTokensThreshold: 1,
},
});
export const searchClient = typesenseAdapter.searchClient;```
above code, I wrote in next.js - typesenseadapter.js