nqxcode / laravel-lucene-search

Laravel 4.2, 5.* package for full-text search over Eloquent models based on ZF2 Lucene.
73 stars 28 forks source link

Getting errors while running search:rebuild laravel 5.4 #51

Closed urvish91 closed 6 years ago

urvish91 commented 7 years ago

when we try to make the command php artisan search:rebuild --verbose.

in laravel 5.4 then we are getting error as below [ZendSearch\Lucene\Exception\RuntimeException] Can't delete file:

Exception trace: () at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\zendsearch\library\ZendSearch\Lucene\Storage\Directory\Filesystem.php:202 ZendSearch\Lucene\Storage\Directory\Filesystem->deleteFile() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\zendsearch\library\ZendSearch\Lucene\Index\SegmentWriter\AbstractSegm entWriter.php:601 ZendSearch\Lucene\Index\SegmentWriter\AbstractSegmentWriter->_generateCFS() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\zendsearch\library\ZendSearch\Lucene\Index\SegmentWrit er\StreamWriter.php:68 ZendSearch\Lucene\Index\SegmentWriter\StreamWriter->close() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\zendsearch\library\ZendSearch\Lucene\Index\SegmentMerger.php:117 ZendSearch\Lucene\Index\SegmentMerger->merge() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\zendsearch\library\ZendSearch\Lucene\Index\Writer.php:370 ZendSearch\Lucene\Index\Writer->_mergeSegments() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\zendsearch\library\ZendSearch\Lucene\Index\Writer.php:328 ZendSearch\Lucene\Index\Writer->_maybeMergeSegments() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\zendsearch\library\ZendSearch\Lucene\Index\Writer.php:237 ZendSearch\Lucene\Index\Writer->addDocument() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\zendsearch\library\ZendSearch\Lucene\Index.php:1132 ZendSearch\Lucene\Index->addDocument() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\laravel-lucene-search\src\Nqxcode\LuceneSearch\Search.php:139 Nqxcode\LuceneSearch\Search->update() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\laravel-lucene-search\src\Nqxcode\LuceneSearch\Console\RebuildCommand.php:45 Nqxcode\LuceneSearch\Console\RebuildCommand->Nqxcode\LuceneSearch\Console{closure}() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\laravel\framework\src\Illuminate\Database\Concerns\B uildsQueries.php:39 Illuminate\Database\Eloquent\Builder->chunk() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php:1357 Illuminate\Database\Eloquent\Model->__call() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\nqxcode\laravel-lucene-search\src\Nqxcode\LuceneSearch\Console\RebuildCommand.php:48 Nqxcode\LuceneSearch\Console\RebuildCommand->fire() at n/a:n/a call_user_func_array() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:29 Illuminate\Container\BoundMethod::Illuminate\Container{closure}() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:87 Illuminate\Container\BoundMethod::callBoundMethod() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:31 Illuminate\Container\BoundMethod::call() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\laravel\framework\src\Illuminate\Container\Container.php:539 Illuminate\Container\Container->call() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\laravel\framework\src\Illuminate\Console\Command.php:182 Illuminate\Console\Command->execute() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\symfony\console\Command\Command.php:264 Symfony\Component\Console\Command\Command->run() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\laravel\framework\src\Illuminate\Console\Command.php:167 Illuminate\Console\Command->run() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\symfony\console\Application.php:869 Symfony\Component\Console\Application->doRunCommand() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\symfony\console\Application.php:223 Symfony\Component\Console\Application->doRun() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\symfony\console\Application.php:130 Symfony\Component\Console\Application->run() at D:\SETUPS\xampp\htdocs\hyperlink\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:122 Illuminate\Foundation\Console\Kernel->handle() at D:\SETUPS\xampp\htdocs\hyperlink\artisan:35

nqxcode commented 6 years ago

Perhaps, this is a trouble of locked index files or incorrect file permissions.