Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong TermInfoIndexFile file format #165

Open
perie opened this issue Feb 17, 2022 · 1 comment
Open

Wrong TermInfoIndexFile file format #165

perie opened this issue Feb 17, 2022 · 1 comment

Comments

@perie
Copy link

perie commented Feb 17, 2022

Hello,
I use https://github.com/sulu/sulu witch implement the massive-search with ZendLucene adapter with load-balancing.
The indexes directory was shared between servers.

Thanks for help

Here the stack trace :
ZendSearch\Lucene\Exception\InvalidFileFormatException:
Wrong TermInfoIndexFile file format

at vendor/handcraftedinthealps/zendsearch/library/ZendSearch/Lucene/Index/DictionaryLoader.php:52
at ZendSearch\Lucene\Index\DictionaryLoader::load('�' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '��_8s.fdx' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '�_8s.fdt' . "\0" . '' . "\0" . '')
(vendor/handcraftedinthealps/zendsearch/library/ZendSearch/Lucene/Index/SegmentInfo.php:774)
at ZendSearch\Lucene\Index\SegmentInfo->_loadDictionaryIndex()
(vendor/handcraftedinthealps/zendsearch/library/ZendSearch/Lucene/Index/SegmentInfo.php:803)
at ZendSearch\Lucene\Index\SegmentInfo->getTermInfo(object(Term))
(vendor/handcraftedinthealps/zendsearch/library/ZendSearch/Lucene/Index.php:898)
at ZendSearch\Lucene\Index->hasTerm(object(Term))
(vendor/handcraftedinthealps/zendsearch/library/ZendSearch/Lucene/Search/Query/Preprocessing/Term.php:120)
at ZendSearch\Lucene\Search\Query\Preprocessing\Term->rewrite(object(Index))
(vendor/handcraftedinthealps/zendsearch/library/ZendSearch/Lucene/Search/Query/Boolean.php:132)
at ZendSearch\Lucene\Search\Query\Boolean->rewrite(object(Index))
(vendor/handcraftedinthealps/zendsearch/library/ZendSearch/Lucene/Index.php:669)
at ZendSearch\Lucene\Index->find(object(Boolean))
(vendor/massive/search-bundle/Search/Adapter/ZendLuceneAdapter.php:390)
at Massive\Bundle\SearchBundle\Search\Adapter\ZendLuceneAdapter->removeExisting(object(Index), object(Document))
(vendor/massive/search-bundle/Search/Adapter/ZendLuceneAdapter.php:113)
at Massive\Bundle\SearchBundle\Search\Adapter\ZendLuceneAdapter->index(object(Document), 'massive_media-fr-i18n')
(vendor/massive/search-bundle/Search/SearchManager.php:178)
at Massive\Bundle\SearchBundle\Search\SearchManager->index(object(FileVersionMeta))
(vendor/massive/search-bundle/Search/EventListener/IndexListener.php:39)
at Massive\Bundle\SearchBundle\Search\EventListener\IndexListener->onIndex(object(IndexEvent), 'massive_search.index', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(IndexEvent), 'massive_search.index', object(TraceableEventDispatcher))
(vendor/symfony/event-dispatcher/EventDispatcher.php:230)
at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener)), 'massive_search.index', object(IndexEvent))
(vendor/symfony/event-dispatcher/EventDispatcher.php:59)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(IndexEvent), 'massive_search.index')
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(IndexEvent), 'massive_search.index')
(vendor/massive/search-bundle/Search/EventSubscriber/DoctrineOrmSubscriber.php:77)
at Massive\Bundle\SearchBundle\Search\EventSubscriber\DoctrineOrmSubscriber->indexEntity(object(FileVersionMeta))
(vendor/massive/search-bundle/Search/EventSubscriber/DoctrineOrmSubscriber.php:51)
at Massive\Bundle\SearchBundle\Search\EventSubscriber\DoctrineOrmSubscriber->postPersist(object(LifecycleEventArgs))
(vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php:68)
at Symfony\Bridge\Doctrine\ContainerAwareEventManager->dispatchEvent('postPersist', object(LifecycleEventArgs))
(vendor/doctrine/orm/lib/Doctrine/ORM/Event/ListenersInvoker.php:99)
at Doctrine\ORM\Event\ListenersInvoker->invoke(object(ClassMetadata), 'postPersist', object(FileVersionMeta), object(LifecycleEventArgs), 4)
(vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1150)
at Doctrine\ORM\UnitOfWork->executeInserts(object(ClassMetadata))
(vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:415)
at Doctrine\ORM\UnitOfWork->commit(null)
(vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:388)
at Doctrine\ORM\EntityManager->flush(null)
(var/cache/admin/dev/ContainerYLhkVOa/EntityManager_9a5be93.php:136)
at ContainerYLhkVOa\EntityManager_9a5be93->flush()
(vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Media/Manager/MediaManager.php:576)
at Sulu\Bundle\MediaBundle\Media\Manager\MediaManager->createMedia(array('locale' => 'fr', 'collection' => '20', 'contentLanguages' => array(), 'publishLanguages' => array(), 'title' => 'transition énergétique', 'formats' => array(), 'id' => null, 'storageOptions' => array('segment' => '05', 'fileName' => 'transition-energetique.svg'), 'name' => 'transition énergétique.svg', 'size' => 2700, 'mimeType' => 'image/svg', 'properties' => array('width' => 72, 'height' => 73), 'type' => array('id' => 2)), object(User))
(vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Media/Manager/MediaManager.php:527)
at Sulu\Bundle\MediaBundle\Media\Manager\MediaManager->buildData(object(UploadedFile), array('locale' => 'fr', 'collection' => '20', 'contentLanguages' => array(), 'publishLanguages' => array(), 'title' => 'transition énergétique', 'formats' => array(), 'id' => null, 'storageOptions' => array('segment' => '05', 'fileName' => 'transition-energetique.svg'), 'name' => 'transition énergétique.svg', 'size' => 2700, 'mimeType' => 'image/svg', 'properties' => array('width' => 72, 'height' => 73), 'type' => array('id' => 2)), object(User))
(vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Media/Manager/MediaManager.php:322)
at Sulu\Bundle\MediaBundle\Media\Manager\MediaManager->save(object(UploadedFile), array('locale' => 'fr', 'collection' => '20', 'contentLanguages' => array(), 'publishLanguages' => array(), 'title' => 'transition énergétique', 'formats' => array(), 'id' => null), 1)
(vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaController.php:533)
at Sulu\Bundle\MediaBundle\Controller\MediaController->saveEntity(null, object(Request))
(vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaController.php:414)
at Sulu\Bundle\MediaBundle\Controller\MediaController->postAction(object(Request))
(vendor/symfony/http-kernel/HttpKernel.php:152)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:74)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:202)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/index.php:66)

@alexander-schranz
Copy link
Member

This shoulds like your index got corrupted. Maybe try to purge and reindex. Also it is recommended to optimize the index in a cronjob when using zend lucene adapter:

bin/console massive:search:optimize

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

No branches or pull requests

2 participants