Comments (6)
Ah missed the small part container_name: typesense
. It should be typesense
instead of localhost
for the hostname. closing this now
from laravel-scout-typesense-driver.
update:
It now works. I missed one part in the configuation, which was adding
networks:
- sail
Now it identifies it and works like a charm.
So, the whole thing should look like this:
typesense:
image: typesense/typesense:0.23.0
environment:
TYPESENSE_DATA_DIR: /data
TYPESENSE_API_KEY: xyz
volumes:
- /tmp/typesense-server-data:/data
ports:
- "8108:8108"
restart: "no"
networks:
- sail
from laravel-scout-typesense-driver.
Ah missed the small part
container_name: typesense
. It should betypesense
instead oflocalhost
for the hostname. closing this now
Hey @jaeyson, I'm experiencing the same exact issue. What do you mean with "It should be typesense instead of localhost for the hostname"?
from laravel-scout-typesense-driver.
@dlogvin im using docker-compose.yml
as an example:
networks:
appname:
services:
typsense:
image: typesense/typesense:0.23.0
container_name: typesense
environment:
TYPESENSE_DATA_DIR: /data
TYPESENSE_API_KEY: xyz
volumes:
- /tmp/typesense-server-data:/data
ports:
- "8108:8108"
restart: "no"
networks:
appname:
Here I'm using typesense
(container name) as the hostname instead of localhost or 127.0.0.1
also in scout.php
, specifically host
key part:
'typesense' => [
'api_key' => env('TYPESENSE_ADMIN_API_KEY', 'xyz'),
'nodes' => [
[
'host' => env('TYPESENSE_NODE', 'typesense'),
'port' => env('TYPESENSE_PORT', '8108'),
'path' => '',
'protocol' => env('TYPESENSE_PROTOCOL', 'http'),
],
],
'nearest_node' => [
'host' => env('TYPESENSE_NODE', 'typesense'),
'port' => env('TYPESENSE_PORT', '8108'),
'path' => '',
'protocol' => env('TYPESENSE_PROTOCOL', 'http'),
],
'connection_timeout_seconds' => 2,
'healthcheck_interval_seconds' => 30,
'num_retries' => 3,
'retry_interval_seconds' => 1,
],
from laravel-scout-typesense-driver.
@dlogvin im using
docker-compose.yml
as an example:networks: appname: services: typsense: image: typesense/typesense:0.23.0 container_name: typesense environment: TYPESENSE_DATA_DIR: /data TYPESENSE_API_KEY: xyz volumes: - /tmp/typesense-server-data:/data ports: - "8108:8108" restart: "no" networks: appname:Here I'm using
typesense
(container name) as the hostname instead of localhost or 127.0.0.1also in
scout.php
, specificallyhost
key part:'typesense' => [ 'api_key' => env('TYPESENSE_ADMIN_API_KEY', 'xyz'), 'nodes' => [ [ 'host' => env('TYPESENSE_NODE', 'typesense'), 'port' => env('TYPESENSE_PORT', '8108'), 'path' => '', 'protocol' => env('TYPESENSE_PROTOCOL', 'http'), ], ], 'nearest_node' => [ 'host' => env('TYPESENSE_NODE', 'typesense'), 'port' => env('TYPESENSE_PORT', '8108'), 'path' => '', 'protocol' => env('TYPESENSE_PROTOCOL', 'http'), ], 'connection_timeout_seconds' => 2, 'healthcheck_interval_seconds' => 30, 'num_retries' => 3, 'retry_interval_seconds' => 1, ],
@jaeyson I tried this yesterday. Unfortunately doesn't work still 🥲
I'm getting a cURL error 6: Could not resolve host: typesense
from laravel-scout-typesense-driver.
can you show me your setup?
when you curl http://localhost:8108/health
, does it return {"ok":true}
?
from laravel-scout-typesense-driver.
Related Issues (20)
- Laravel 10 Support HOT 10
- Error from Typesense on Update of Model Instance which is not in index HOT 2
- PHP 8.2 deprecation warnings HOT 1
- Laravel Scout 10? HOT 1
- Unable to sort HOT 4
- Error importing document: Field `itemStocks` not found. HOT 2
- "Undefined property: Laravel\\Scout\\Builder::$whereIns", HOT 1
- Filter in typesensne collection of objects in Laravel
- $model->unsearchable(); does not work HOT 7
- Import not working with array data. HOT 11
- Model update resets document auto-generated embeddings HOT 1
- Cannot index collection with a soft deleted first model when scout.soft_delete is true HOT 2
- Hotfix TypeError - Typesense\\Documents::import(): Argument #1 ($documents) must be of type string, array given. HOT 5
- Undefined property: Laravel\Scout\Builder::$whereIns
- Passing "empty" values to search query results in "Parameter `q` is required"
- Please add possibility to use Laravel Scout Builder ->options() method
- Duplicate array keys in TypesenseEngine::buildSearchParams HOT 1
- Exception when searching large datasets for common query HOT 2
- Using Multi Search after merging to Laravel Scout HOT 2
- Typesense scout import fails in Laravel 11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-scout-typesense-driver.