On Tue, Jun 24, 2008 at 07:57:29AM -0700, C�dric Sadai wrote:
> I'm trying to set up a search engine basic functionnality for a 1.1
> project, and chose the news plugin (I know, it's alpha..).

Hey,
Firstly, sorry for my late response.  I was on vacation the last week 
and did not have access to a computer.

Glad you are trying sfSearch out.  As you know, it's still (pre-)alpha 
software, so I can't recommend it for any sort of production right now.

> I want it to scan a model "Article". For that purpose, I have put in
> my ->configure():
> 
>               $this->setEngine(new 
> xfLuceneEngine(sfConfig::get('sf_data_dir') . '/
> index/myIndex'));
> 
>               $propelIdentifier = new xfPropelIdentifier('Article');
>               $articleService = new xfService($propelIdentifier);
>               $articleService->addBuilder(new xfPropelBuilder(array(
>                       new xfField('title', xfField::TEXT))
>               ));
> 
>               $articleService->addRetort(new xfRetortField);
>               $articleService->addRetort(new 
> xfRetortRoute('content/index?title=
> $title$'));
> 
>               $this->getServiceRegistry()->register($articleService);
> 
> Two questions:
> 
> A) When I try to populate the index, I have this error:
> "No connection params set for propel". I've tried everything in my
> config file, in the original batch script, in the original populate
> method, but I can locate the problem.

sfSearch uses a hack to get this to work, which seems to be failing for 
you.  Are you setting up your database in the project level 
config/databases.yml?  If you set it up in the application level 
databases.yml, you will experience this problem.

> B) What about I18n? For that purpose I wanted to create an index per
> language, and then make a group.
> 
> I wanted to add a criteria when setting my index, like
> $c = new Criteria();
> $c->add(ArticleI18nPeer::CULTURE, 'fr');
> $propelIdentifier->setDiscoverCriteria($c);
> $propelIdentifier->setPeerSelectMethod('doSelectWithI18n');
> 
> Am I right?

This is probably the best way to implement i18n at this moment.  I am
working towards tiny refactorings to get better i18n support in at this 
time.  After all the trouble with i18n in the original sfLucenePlugin, I 
am going to make a concentrated effort of getting i18n to work as 
smoothly as possible this time around.

But, I can tell you that each culture/language will get its own index 
and then will be grouped together by a... group.

Carl

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to