ganuonglachanh / flarum-sonic Goto Github PK
View Code? Open in Web Editor NEWSupport search in flarum by sonic
License: GNU Affero General Public License v3.0
Support search in flarum by sonic
License: GNU Affero General Public License v3.0
Hello, I am looking for a better flarum search extension for my forum, just test sonic and felt good.
But I found that the return data missed the "mostRelevantPost" fields.
Maybe we need to implements this without "match aganist" SQL query.
reference: 0xffff-one/flarum-0x#20 (comment)
Hello, can you explain how this plugin is used in Docker? I use https://github.com/RikoDEV/flarum-docker, It was built, but there was an error accessing it in the Docker.
I have made some improvements and added a tool mainly for connecting to the network.
apk add --no-progress --no-cache netcat-openbsd nmap socat busybox-extras
I am able to access sonic
in the flarum container, indicating that I should be able to access it correctly. IP:1491, where IP is the sonic container's IP, The testing is as follows:
/flarum/app # nmap -p 1491 192.168.128.5
Starting Nmap 7.93 ( https://nmap.org ) at 2023-08-11 23:59 UTC
Nmap scan report for sonic.app0_flarum_network (192.168.128.5)
Host is up (0.000048s latency).
PORT STATE SERVICE
1491/tcp open anynetgateway
MAC Address: 02:42:C0:A8:80:05 (Unknown)
/flarum/app # nc -v 192.168.128.5 1491
192.168.128.5 (192.168.128.5:1491) open
CONNECTED <sonic-server v1.4.0>
^Z[1]+ Stopped nc -v 192.168.128.5 1491
But when I run the following code, it will cause an error, which I don't quite understand,
/flarum/app # php flarum sonic:addtoindex
Starting...
Flush old postCollection: 0
Adding to index...
In Connection.php line 712:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'is_approved' in 'where clause' (SQL: select `id`, `content` from `flarum_p
osts` where `type` = comment and `is_approved` = 1 and `is_private` = 0 and `hidden_at` is null and `type` in (comment, discussion
Renamed))
In Exception.php line 18:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'is_approved' in 'where clause'
In PDOConnection.php line 82:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'is_approved' in 'where clause'
sonic:addtoindex
If I switch to a different server and run locally, is there no problem? May I ask how to solve this? I am not familiar with PHP and nginx, and my docker-compose.yml is as follows: (Other related settings remain basically unchanged)
version: "3"
services:
flarum:
image: ghcr.io/rikodev/flarum-docker:latest
container_name: flarum
env_file:
- ./flarum.env
environment:
- PHP_EXTENSIONS=gmp session brotli
volumes:
- ./flarum/app/public/assets:/flarum/app/public/assets
- ./flarum/app/extensions:/flarum/app/extensions
- ./flarum/app/storage/logs:/flarum/app/storage/logs
- ./flarum/nginx:/etc/nginx/flarum
ports:
- 8900:8888
networks:
- flarum_network
depends_on:
mariadb:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8888"]
interval: 30s
timeout: 10s
retries: 5
mariadb:
image: mariadb:10.6
container_name: mariadb
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=password1
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=password1
volumes:
- ./mysql/db:/var/lib/mysql
networks:
- flarum_network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "--silent"]
interval: 30s
timeout: 10s
retries: 5
Nginxapp:
image: 'jc21/nginx-proxy-manager:latest'
container_name: Nginx
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
networks:
- flarum_network
depends_on:
flarum:
condition: service_healthy
sonic:
image: valeriansaliou/sonic:v1.4.0
container_name: sonic
restart: unless-stopped
ports:
- "1491:1491"
volumes:
- ./config.cfg:/etc/sonic.cfg
- ./sonic/store/:/var/lib/sonic/store/
depends_on:
- Nginxapp
- flarum
networks:
- flarum_network
networks:
flarum_network:
PHP Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Event\SonicEventSubscriber::$settings is deprecated in vendor/ganuonglachanh/sonic/src/Event/SonicEventSubscriber.php on line 16
Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Event\SonicEventSubscriber::$settings is deprecated in vendor/ganuonglachanh/sonic/src/Event/SonicEventSubscriber.php on line 16
PHP Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Event\SonicEventSubscriber::$locale is deprecated in vendor/ganuonglachanh/sonic/src/Event/SonicEventSubscriber.php on line 18
Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Event\SonicEventSubscriber::$locale is deprecated in vendor/ganuonglachanh/sonic/src/Event/SonicEventSubscriber.php on line 18
PHP Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Event\SonicEventSubscriber::$password is deprecated in vendor/ganuonglachanh/sonic/src/Event/SonicEventSubscriber.php on line 20
Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Event\SonicEventSubscriber::$password is deprecated in vendor/ganuonglachanh/sonic/src/Event/SonicEventSubscriber.php on line 20
PHP Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Event\SonicEventSubscriber::$ingest is deprecated in vendor/ganuonglachanh/sonic/src/Event/SonicEventSubscriber.php on line 27
Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Event\SonicEventSubscriber::$ingest is deprecated in vendor/ganuonglachanh/sonic/src/Event/SonicEventSubscriber.php on line 27
PHP Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Event\SonicEventSubscriber::$control is deprecated in vendor/ganuonglachanh/sonic/src/Event/SonicEventSubscriber.php on line 28
Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Event\SonicEventSubscriber::$control is deprecated in vendor/ganuonglachanh/sonic/src/Event/SonicEventSubscriber.php on line 28
PHP Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Console\AddToIndex::$settings is deprecated in vendor/ganuonglachanh/sonic/src/Console/AddToIndex.php on line 22
Deprecated: Creation of dynamic property GaNuongLaChanh\Sonic\Console\AddToIndex::$settings is deprecated in vendor/ganuonglachanh/sonic/src/Console/AddToIndex.php on line 22
php flarum sonic:addtoindex
Starting...
Flush old postCollection: 1
Adding to index...
In Ingest.php line 63:
[InvalidArgumentException]
sonic:addtoindex
sonic 1.3.2 版本,flarum 1.2.0 版本
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.