Closed teamcoltra closed 6 years ago
That seems to be an incorrectly ported piece of code by me.
Do you still get a result when using the search, despite the error message?
Right now my options are barebones:
$fuse = new \Fuse\Fuse($new, [
"keys" => [ "title", "author" ]]);
No results
I just used their web demo and it works fine when I use json or my array.
Hm. It's hard for to reproduce the error without having the whole dataset and the search query.
I know how the PHP Notice
message emerges and how to avoid that, but you should still get a result...
json file = https://pastebin.ca/3957763
require_once 'vendor/autoload.php';
$json = file_get_contents('jason.txt');
$decoded = json_decode($json,true);
$fuse = new \Fuse\Fuse($decoded, [
"keys" => [ "title", "author" ]]);
$fuse->search('doc');
Thanks, I'll take a look. š
I feel like I have found part of the issue, which is just me being dumb and not print_r($fuse->search('doc')); that's why I'm not getting any results.
facepalm
So if you already know the reason for the generated errors I think we solved it.
Great. Was just about to say, I'm not having any issues with getting results from your code & data. š
The problem is the actual full sized json file is ~30MB large, https://github.com/robotomize/fujes handles it pretty quickly but this really chugs at it. That's not a complaint against the system, I don't think my use case is typical. That's probably a bit why I am having more of these issues.
Possibly. I'm not very deep into the CS-related details on the algorithm. After all, this library is just a port. :)
Btw, new version (3.2.2) is out. Your PHP notices should be gone with that. (And I really should turn mine on for library development. š )
If this solves your problem, feel free to close this issue. :)
Yes it does, new update works great. Thanks Loilo!
My pleasure.
I have an array that outputs like this:
But that results in:
I was wondering what I need to do to? I have tried putting my array into a parent array but that changes everything to: