Skip to content

Conversation

@thangngoc89
Copy link

I'm new to Elastic Search and your package help me do a lot of magic things. Now, I need it in my Laravel 5 project so I modify some file to make it work with Laravel 5 (no back-compatibility with Laravel 4.2). I hope this is a good start for Larasearch in Laravel 5

thangngoc89 and others added 5 commits March 8, 2015 20:45
The command 'php artisan larasearch:paths --dir=app --relations 'App\MySearchableModel' --write-config' did not work any more.
Fix to reflect the changes in Laravel 5:
- config folder has now changed to /config/ + now checking for the larasearch.php file instead of the package config folder
- 'config:publish' is now 'vendor:publish'
PathCommand --write-config updated to Laravel 5
@iverberk
Copy link
Owner

Thanks for the effort! I'm not using Laravel 5.0 myself yet but I definitely want to make it available to Laravel 5.0 users as soon as possible. I'll review the code tomorrow and come up with a version number.

@feenx
Copy link

feenx commented Mar 11, 2015

Perfect lol

@thangngoc89
Copy link
Author

@pfeiferchristopher Thanks.

@feenx
Copy link

feenx commented Mar 23, 2015

@iverberk did you get a chance to look over this code? I just tried installing Larasearch again but looks like it still installed the L4.2 version.

@thangngoc89
Copy link
Author

@iverberk any progress?

@feenx
Copy link

feenx commented Mar 27, 2015

@thangngoc89 it seems to work. I haven't had much time to work on it but I was able to get it pulled in and when I ran the larasearch:paths with and without --relations I got the right result. Haven't tried actually indexing anything or searching but I should soon.

@thangngoc89
Copy link
Author

@pfeiferchristopher my orginal project dosen't require elastic search anymore so i don't have enough time to investigate about this. I ask that question because I'm cleaning my repo list

@feenx
Copy link

feenx commented Mar 27, 2015

By bad I thought you tagged me because I got the email haha. I'd like to see this merged as well.

@thangngoc89
Copy link
Author

@pfeiferchristopher when did I tag you ?

@feenx
Copy link

feenx commented Mar 28, 2015

I said I thought you did because I got the email. You didn't.

@feenx
Copy link

feenx commented Mar 29, 2015

@thangngoc89 one thing I have noticed is when running the reindex command I ran into

[ErrorException]
  Undefined index: errors

during the first batch. Going through the code I found this in \Iverberk\Larasearch\Index.php

if ($results['errors'])

and by changing it to

if ( array_key_exists('errors', $results) )

I was able to successfully index my Model and search correctly against it. I haven't got to having ImportJob triggered in order to say if that works or not.

As for you saying you're cleaning up your repo, is it possible for me to fork your changes and host them myself until @iverberk is able to look them over and merge the pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants