This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » Search plugins » problem about lucene
problem about lucene [message #86901] Sun, 18 October 2009 14:40 Go to next message
kawai  is currently offline kawai
Messages: 7
Registered: October 2009
Junior Member
So I try to explain my problem more clearly. when i used this commande: symfony lucene-rebuild myapp(or lucene:rebuild),I got the following error : there is no tasks defined in the 'lucene'namespace.
ps: using symfony 1.2 lucene ,sfLucenePlugin - 0.1.6.
thanks in avance
Re: problem about lucene [message #86905 is a reply to message #86901 ] Sun, 18 October 2009 17:37 Go to previous messageGo to next message
weaverryan  is currently offline weaverryan
Messages: 781
Registered: November 2007
Location: Nashville, TN
Faithful Member

Just run the empty symfony command:

./symfony

and see if any of the lucene tasks show up in the list.
Also make sure you have the sfLucenePlugin enbled in your ProjectConfiguration.class.php file.


Ryan Weaver
http://www.sympalphp.org
http://www.thatsquality.com
@weaverryan
Re: problem about lucene [message #86924 is a reply to message #86905 ] Sun, 18 October 2009 23:23 Go to previous messageGo to next message
kawai  is currently offline kawai
Messages: 7
Registered: October 2009
Junior Member
lucene doesn't exist in the symfony list and my ProjectConfiguration.class.php file like this:
<?php

require_once dirname(__FILE__).'/../../vendor/symfony/lib/autoload/sfCore Autoload.class.php';
//require_once '/usr/share/php5/symfonyassurweb/lib/autoload/sfCoreAutoload .class.php';

sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
static protected $zendLoaded = false;

static public function registerZend()
{
if (self::$zendLoaded)
{
return;
}

set_include_path(sfConfig::get('sf_lib_dir').'/vendor'.PATH_ SEPARATOR.get_include_path());
require_once sfConfig::get('sf_lib_dir').'/vendor/Zend/Loader.php';
Zend_Loader::registerAutoload();
self::$zendLoaded = true;
}


public function setup()
{
// for compatibility / remove and enable only the plugins you want
$this->enableAllPluginsExcept(array('sfDoctrinePlugin', 'sfCompat10Plugin'));
}
}

So what's wrong with it?
Re: problem about lucene [message #86925 is a reply to message #86924 ] Sun, 18 October 2009 23:29 Go to previous messageGo to next message
weaverryan  is currently offline weaverryan
Messages: 781
Registered: November 2007
Location: Nashville, TN
Faithful Member

kawai-

Your project configuration file looks fine. Verify that the task files physically exist at the following location:

/path/to/project/plugins/sfLucenePlugin/lib/task


Symfony doesn't really do anything magical to find the available tasks - it literally just searches for files ending in Task.class.php in a variety of directories. So, double check that the tasks themselves are in the right location.


Ryan Weaver
http://www.sympalphp.org
http://www.thatsquality.com
@weaverryan
Re: problem about lucene [message #86939 is a reply to message #86925 ] Mon, 19 October 2009 09:35 Go to previous messageGo to next message
kawai  is currently offline kawai
Messages: 7
Registered: October 2009
Junior Member
Salut weaverryan Razz
As u said , I checked the Task files, it doesn't exist. I did the configuration just like tutorial Jobeet did. So i can't use the commande line?
Thanks a lot

[Updated on: Mon, 19 October 2009 11:58]

Re: problem about lucene [message #86976 is a reply to message #86939 ] Tue, 20 October 2009 01:38 Go to previous message
weaverryan  is currently offline weaverryan
Messages: 781
Registered: November 2007
Location: Nashville, TN
Faithful Member

Ah yes, this is a subtle difference. Jobeet brings in Zend's Lucene directly, whereas the sfLucenePlugin is a separate plugin which brings in Zend Lucene as well as a bunch of other things to help you use it. One of those things are these tasks that you're looking for. So, if you want the tasks, you need to use sfLucenePlugin.

Unfortunately, while sfLucenePlugin is very robust and production-ready, its documentation is lacking a little bit as part of it is currently being refactored to work with Solr (which is awesome).

Good luck!


Ryan Weaver
http://www.sympalphp.org
http://www.thatsquality.com
@weaverryan
Previous Topic:sfLucene and NO culture
Next Topic:Search filter
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software