dachcom-digital / pimcore-lucene-search Goto Github PK
View Code? Open in Web Editor NEWPimcore Website Indexer (powered by Zend Search Lucene)
License: Other
Pimcore Website Indexer (powered by Zend Search Lucene)
License: Other
Sometimes, its very hard to debug Lucene Search. Therefore it would be nice to have more debug informations like:
It should be possible to display the meta description instead of "random" content in result list.
Hi
We configured lucene search according to the documentation. The crawler has finished successfully and the search template was added with following code:
<?= $this->actions()->render(new \Symfony\Component\HttpKernel\Controller\ControllerReference('LuceneSearchBundle:List:getResult')); ?>
But when we add /search?p=test nothing is shown in the list. We only get empty divs generated by the lucene search layout.
Did we forgot something?
Our config is:
lucene_search:
enabled: true
sitemap:
render: false
fuzzy_search_results: false
search_suggestion: true
seeds:
- 'http://domain-xy.com'
filter:
valid_links:
- '@^http://domain-xy.com.*@i'
view:
max_per_page: 10
crawler:
content_max_size: 4
locale:
ignore_language: true
In order to install the Plugin, it must be enabled first. However - once enabled, the class DependencyInjection/LuceneSearchExtension.php expects the config file var/bundles/LuceneSearchBundle/config.yml to alreay exist. This yields a PHP warning, which in turn throws an exception in dev-Environment or when debug mode is enabled.
Steps to reproduce: (PIMCORE_ENVIRONMENT is "dev")
vagrant@develop:/workspace/test$ bin/console pimcore:bundle:enable LuceneSearchBundle
[OK] Bundle "LuceneSearchBundle\LuceneSearchBundle" was successfully enabled
vagrant@develop:/workspace/test$ bin/console pimcore:bundle:install LuceneSearchBundle
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ContextErrorException: Warning: file_get_contents(/workspace/test/var/bundles/LuceneSearchBundle/config.yml): failed to open stream: No such file or directory in src/LuceneSearchBundle/DependencyInjection/LuceneSearchExtension.php:26
Proposed fix: Just suppressing the warning using the @
in front of file_get_contents:
$bundleConfig =Yaml::parse(@file_get_contents(BundleConfiguration::SYSTEM_CONFIG_FILE_PATH));
In some cases (especially large pages), the oom killer triggers because of heavy memory usage.
Use file persistence to avoid this.
replace tagfields with something like this: http://examples.sencha.com/extjs/6.0.1/examples/kitchensink/#form-fieldreplicator
Tried already and had some conflicts with composer since pimcore requires
"zendframework/zend-servicemanager": "^3.2"
which relies on the "zendframework/zend-stdlib": "^3.1"
package.
Since the ZendSearch packages requires "zendframework/zend-stdlib": "2.*"
we're going to run into some conflicts.
When the CLI Command runs into an error, you need to manually delete the tmp file.
Find a good way to localize pdf indexing.
restriction.enabled = false
:Update to latest vdb/php-spider.
Because this is still the best crawl library out there, we may gonna fork and tag this repo.
This is the message:
Fatal error: Class 'LuceneSearch\Model\Configuration' not found in /var/www/plugins/LuceneSearch/controllers/FrontendController.php on line 48
Andreas
Sorry - installed it by composer and thought that plugin is installed by composer. But now I see that it is necessary to install it also by "activate extension" in pimcore backend.
The instructions state that I should setup a view script containing:
$this->action('find', 'frontend', 'LuceneSearch', array('viewScript' => 'frontend/find.php'));
This yields the following error:
script 'frontend/find.php' not found in path (/Users/patrick/Sites/externt/lucenetest/plugins/LuceneSearch/views/scripts/:/Users/patrick/Sites/externt/lucenetest/website/views/layouts/:/Users/patrick/Sites/externt/lucenetest/website/views/scripts/:./views/layouts/:./views/scripts/)
Just copying the contents of plugins/LuceneSearch/views/scripts/search/find.php won't do since it's useless without it's controller ..
What am I missing?
the regex @^http://www\\.pimcore\\.org*@i
is wrong, should be @^http://www\.pimcore\.org*@i
Add a new feature to show all indexed documents and closer inspection in admin backend, this allows for better debugging and understandability what the index actually saved.
lucene_search:
categories:
- {id: 1, label: 'Category 1'}
- {id: 2, label: 'Category 2'}
{% if lucene_search_crawler_active() %}
<meta name="lucene-search:categories">1,2</head>
{% endif %}
Also use renderTemplate
for listAction.
I installed for Pimcore 5 using composer . Activated using extension manager
but can't get the crawler to start.
Keep getting error :
no valid task iterators defined!
I start the crawler with :
php bin/console lucenesearch:crawl -v
Any idea what could be going wrong ?
Thanks!
Hello,
I was asking me if the plugin can handle subsite and langage separation (for search, autocomplete and suggestion), so it send only result for the langage or subsite ?
Is there any way to configure it like this ?
If not, maybe it could be improved to handle multi-site and multi-langage case.
Thanks again for this wonderfull plugin very complete (i really liked the auto sugestion : )) like Google)
Allow to set some exclude tags. For example:
main-content: Keep Data in between!
main-content-exclude: Remove Data in between!
<!-- main-content-->
<span>Good Content! Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus.</span>
<!-- main-content-exclude -->
<span class="boring-text">Boring! This will be excluded in search!</span>
<!-- /main-content-exclude -->
<span>Good Content! Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus</span>
<!-- /main-content-->
Hi, first of all - sorry for re-opening but in my case it needs to be :( I'm running pimcore 5, everything works well and I installed lucene using the composer, activated at the extension manager and so on. I placed the lucene config from above example at src/Appbundle/Resources/config/pimcore/config.yml as suggested but if i start a manual crawl on the console I still having the Error "no valid task iterators defined!"
any ideas ? thanks in advance ! kind regards
I need categories from the Pimcore objects. Unfortunately I don't have access to the class category.
AppBundle\LuceneSearch\Services\Categories
public function getCategories() : array
{
$categoryArray = [];
array_push($categoryArray, ['id' => 1, 'label' => 'Blog']);
array_push($categoryArray, ['id' => 2, 'label' => 'Support']);
array_push($categoryArray, ['id' => 3, 'label' => 'Project']);
$catList = new DataObject\....\Listing(); // -> ERROR (Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function get() on null in /var/www/html/pimcore/lib/Pimcore/Db.php on line 51)
foreach ($catList as $cat) {
array_push($categoryArray, ['id' => $cat->getId(), 'label' => $cat->getName()]);
}
return $categoryArray;
}
filter:
allow_hash_in_url: false # default = false
allow_query_in_url: false # default = false
Is there a specific reason why you read the complete log file in order to add a line to it? This seems to be much overhead once the log file grows bigger - why not just something like:
$current = date('d.m.Y H:i') . '|' . $this->getRealLevel($level) . '|' . $message . "\n";
file_put_contents($file, $current, FILE_APPEND);
Add some log infos about the last crawl, including:
Allow some custom meta data which should be indexed only in crawler mode.
if( \LuceneSearch\Tool\Request::isLuceneSearchCrawler() )
{
$this->view->headMeta()->setName( 'lucene-search-meta', 'awesome special data' );
}
use a more generic config style:
instead of
restriction:ignore: true
restriction:class: ~
restriction:method: ~
use
restriction:
ignore: true
class: ~
method: ~
If there is no state.cnf, LuceneSearch fails with following error:
invalid state config slot "finished"
This is due to a missing state.cnf. But there is currently no state.cnf, because LuceneSearch support has just been deployed.
I followed the guide to implement the search page with ajax autoComplete
when ,I search, I get the following error :
Symfony\Component\Debug\Exception\ContextErrorException
in vendor\dachcom-digital\lucene-search\src\LuceneSearchBundle\Controller\AutoCompleteController.php (line 26)
foreach ($terms as $term) { $t = $term->text;
Any help ?
Pimcore has its own Sitemap Builder now: pimcore/pimcore#1901
if country restriction has been activated, no pdf will be shown up - it's not possible to detect.
Add assigned_country
as asset property, to get associated country
Allow user to set asset free from country restriction: Update countryQuery
and exclude assets from country restriction queries.
This has been dramatically changed in pimcore build 3987 (see pimcore/pimcore#937).
currently if meta tag has been set, lucene search will throw some heavy errors.
Multiple Start Urls for crawling result in having only indexed the latest one. For example:
b2b.domain.com
www.domain.com
test.domain.com
LuceneSearch crawls these domains, but only indexes the last one.
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.