#community-help

Understanding Docker Command and Troubleshooting Typesense Data Issue

TLDR vikram needed help understanding a docker command and why no data was displaying on a Typesense demo page. Kishore Nallan helped explain the command, suggested checking the browser console and if data exists in Typesense collection. The issue remains unresolved as vikram couldn't connect to host.

Powered by Struct AI
Nov 03, 2022 (14 months ago)
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
08:18 AM
Hi All, i need to understand below docker command
docker run -p 8108:8108 -v$(pwd)/typesense-data:/data typesense/typesense:0.23.1 \
  --data-dir /data --api-key=$TYPESENSE_API_KEY --enable-cors

i dont know -v$(pwd)/typesense-data:/data what does this indicate and also this one --data-dir /data.i just know it is the place where typesense data is store but i need to know more.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
08:23 AM
You are mounting present working directory (pwd) as /typesense-data volume inside the container. Then you also must make --data-dir point to that mounted volume.
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
11:40 AM
I have tried to run on server but i am not getting any data on page.
11:40
vikram
11:40 AM
below is the screenshot.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
11:42 AM
Have you tried running any of our existing demos? Do they work?
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
11:42 AM
this is demo only
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:00 PM
What error are you getting?
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
12:02 PM
i am not getting any error
12:02
vikram
12:02 PM
its just not able to see data
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:02 PM
Check your browser console
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
12:04 PM
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:04 PM
Check if the typesense collection actually has data.
vikram
Photo of md5-f930fdb99fd46477205fa1201164ea50
vikram
03:31 PM
Done indexing.
[root@solr-listing-1406-26jj typesense-instantsearch-demo]# npm start

> [email protected] start /var/www/html/algolia/typesense/typesense-instantsearch-demo
> parcel index.html --port 3000
Server running at http://localhost:3000
Built in 1.60s.

[root@solr-listing-1406-26jj typesense-instantsearch-demo]# curl -H "X-TYPESENSE-API-KEY: xyz" "http://publicip:8108/collections/hungama/documents/search?q=*&query_by=dataset" | jq


curl: (7) couldn't connect to host
03:31
vikram
03:31 PM
getting above error

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community

Similar Threads

Resolving Typesense Server Connection with Correct API Keys and Paths

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.

1

30
4mo

Troubleshooting Issues with DocSearch Hits and Scraper Configuration

Rubai encountered issues with search result priorities and ellipsis. Jason helped debug the issue and suggested using different versions of typesense-docsearch.js, updating initialization parameters, and running the scraper on a Linux-based environment. The issues related to hits structure and scraper configuration were resolved.

7

131
8mo

Issues with Typesense Frontend Search Integration

Akash experienced issues integrating Typesense into their frontend search, particularly with their search box. Jason guided them to troubleshoot, eventually identifying the issue to be with react-instantsearch-dom and suggesting a downgrade to react 17, which resolved the issue.

2

52
14mo

Troubleshooting Typesense Connection Issue and Data Retrieval

Felix encountered issues connecting to a server-created typesense and retrieving data collections. Kishore Nallan and Jason provided guidance, highlighting errors in the original code and suggesting changes to the URL and curl command.

63
24mo

Solving Typesense Docsearch Scraper Issues

Sandeep was having issues with Typesense's docsearch scraper and getting fewer results than with Algolia's scraper. Jason helped by sharing the query they use and advised checking the running version of the scraper. The issue was resolved when Sandeep ran the non-base regular docker image.

28
24mo