TLDR Rubai had trouble creating a working API key for Typesense and understanding number_hits versus num_documents. Jason provided clarification and correct code for generating a search-only API Key and using correct server configurations.
number_hits is not a Typesense param…
so , is this the number of record stored on for my particular collection
num_documents in the collection schema is indeed the number of records stored in that particular collection
got it . and can you please confirm is this is the curl for generating only search access
`curl '
No that’s an admin key
This is how you generate a search key:
I am creating key with this curl
`curl '
That sounds like a networking problem. The browser is unable to connect to the Typesense server. It’s unrelated to api keys
Now I am getting
In your first screenshot I saw a different collection name. If that’s the collection you’re trying to search, you want to generate an API key with that collection name. The last code snippet you shared above has the collection name as “companies”, which is why it’s not working
no the curl was just demo . I updated the curl with our requirements
the 1st image of the thread is the collection name
To isolate the issue, could you give me a set of steps like this that reproduces the issue:
what does the error means
you can check the health for typesense here
If you look at the response body in the network tab in the browser tab, you’ll see the cause of the 404. If it just says not found, it’s likely the collection name is not found
can You please check here what's the issue
I can see the collection from collection API
is typesense host support in the / format ?
my typesense host is
`'
You want to use the `path` config like this:
```{
host: "
my typesense host in `
beacuse i have the collection whatever we search . but can't able to call from frontend JS . is the cause for my host like `
host has to be just the hostname “
```typesenseServerConfig: {
nodes: [
{
host: '
ok let me try
if path is empty then can it be cause any issue
Path is optional
ok
hey Jason thank you so much it's working now
Rubai
Fri, 28 Jul 2023 18:07:57 UTCis num_documents & number_hits both are same ? Jason