caneara / quest Goto Github PK
View Code? Open in Web Editor NEWA pseudo fuzzy-searching library for Laravel database queries.
License: MIT License
A pseudo fuzzy-searching library for Laravel database queries.
License: MIT License
When searching across multiple columns, if the query would normally return a match with ONE whereFuzzy, that result is not returned if second column query returns null.
Would it be possible to built an OR function to return a better result set in that instance ?
I.e.
User::whereFuzzy('name', 'jd')
->orWhereFuzzy('email', 'gm')
->first();
For example, if I do not want to show any results if the score is less than x.
DB::table('users')
->whereFuzzy('name', 'jd') // matches John Doe
->atLeast(60)
->first();
Hi,
Was looking for a replacement for Searchy and came across your implementation.
In my use case, I need an orWhereFuzzy, so that the query returns results having at least one relevance index > 0 as opposed to having all of them > 0.
Tried contributing but need access.
I have attached the needed changes here if you are kind enough to include them.
orWhereFuzzy.zip
Thank you,
Catalin Nita.
First of all, great package...thanks!
I'm having an issue with extra characters and slight misspellings. I wasn't sure if this was expected behavior:
Matching for guacamole
...if I type:
guac
it worksguacamolee
does not workguacemole
does not workAm I doing something wrong?
I just booted up a fresh Laravel repo and need some fuzzy search functionality. After following the docs for using, my code looks like this.
RoutingNumber::whereFuzzy('bank_name', 'WELLS')->first();
After running, I get this error:
ArgumentCountError: Too few arguments to function Illuminate\Database\Query\Expression::getValue(), 0 passed in /home/jon/Projects/Teleforce/routing_number_lookup/vendor/caneara/quest/src/Macros/WhereFuzzy.php on line 95 and exactly 1 expected in file /home/jon/Projects/Teleforce/routing_number_lookup/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php on line 34
I then tried to use the DB facade configuration, and the same error occurred.
Here are the relavant packages in my composer.json
"require": { "php": "^8.1", "caneara/quest": "^2.0", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.0", "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8" }, "require-dev": { "fakerphp/faker": "^1.9.1", "laravel/pint": "^1.0", "laravel/sail": "^1.18", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^7.0", "phpunit/phpunit": "^10.1", "spatie/laravel-ignition": "^2.0" },
If you need more information let me know. Thanks for the time.
I'm wanting to search on two columns, one of which is nullable. At the moment I get str_replace(): Argument #3 ($subject) must be of type array|string, null given
when doing so, so I suspect there isn't built-in support for this.
Is there a workaround for this?
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.