Sonic is a super fast auto suggestion engine built by the team at crisp.chat, a customer engagement platform. its built in Rust and they officially support a javascript client, but if you want to use sonic via php, this is the library that you can look for. Completely unit tested, and adheres to modern coding standards, and offers a clean api to interact with sonic.
MIT License
130
stars
9
forks
source link
PHP Fatal error: Uncaught ValueError: str_split(): Argument #2 ($length) must be greater than 0 #37
Brew package installation.
Sample code as per instructions.
Stack trace:
0 /Users/...: str_split('hi Shobi how ar...', -55)
1 /Users/..../src/Ingest.php(55): Psonic\Ingest->splitString('messagesCollect...', 'defaultBucket', '1234', 'hi Shobi how ar...')
2 /Users/.../test.php(10): Psonic\Ingest->push('messagesCollect...', 'defaultBucket', '1234', 'hi Shobi how ar...')
3 {main}
thrown in /..../psonic/src/Ingest.php on line 146