This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

problem about lucene

Questions relating to sfLucenePlugin, sfSearch etc

problem about lucene

by kawai » Sun Oct 18, 2009 2:40 pm

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
kawai
Junior Member
 
Posts: 7
Joined: Tue Oct 13, 2009 9:29 am

Re: problem about lucene

by weaverryan » Sun Oct 18, 2009 5:37 pm

Just run the empty symfony command:

Code: Select all
./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 - CEO of KnpLabs US
Offering Symfony2 training May 19th & 20th - Nasvhille, TN and June 6th & 7th - New York, NY

http://www.thatsquality.com
@weaverryan
User avatar
weaverryan
Faithful Member
 
Posts: 784
Joined: Sat Nov 10, 2007 1:50 am
Location: Nashville, TN

Re: problem about lucene

by kawai » Sun Oct 18, 2009 11:23 pm

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?
kawai
Junior Member
 
Posts: 7
Joined: Tue Oct 13, 2009 9:29 am

Re: problem about lucene

by weaverryan » Sun Oct 18, 2009 11:29 pm

kawai-

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

Code: Select all
/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 - CEO of KnpLabs US
Offering Symfony2 training May 19th & 20th - Nasvhille, TN and June 6th & 7th - New York, NY

http://www.thatsquality.com
@weaverryan
User avatar
weaverryan
Faithful Member
 
Posts: 784
Joined: Sat Nov 10, 2007 1:50 am
Location: Nashville, TN

Re: problem about lucene

by kawai » Mon Oct 19, 2009 9:35 am

Salut weaverryan :P
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
kawai
Junior Member
 
Posts: 7
Joined: Tue Oct 13, 2009 9:29 am

Re: problem about lucene

by weaverryan » Tue Oct 20, 2009 1:38 am

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 - CEO of KnpLabs US
Offering Symfony2 training May 19th & 20th - Nasvhille, TN and June 6th & 7th - New York, NY

http://www.thatsquality.com
@weaverryan
User avatar
weaverryan
Faithful Member
 
Posts: 784
Joined: Sat Nov 10, 2007 1:50 am
Location: Nashville, TN