[Erp5-dev] search for email fast (portal_catalog?)

Bartłomiej Górny bartek at redpoint.mn.pl
Sat Mar 25 13:53:02 CET 2006


Bartek Gorny wrote:
> On 3/22/06, Jean-Paul Smets <jp at nexedi.com> wrote:
>> Le Lundi 20 Mars 2006 13:47, Bartek Gorny a écrit :
>>> Hello
>>>
>>> I need to quickly find an email address in ERP5 database - is there a
>>> way to use portal_catalog for it, to search object by url_string
>>> property? Should I add something to portal_catalog settings, or create
>>> an sql method, or what?
>>>
>>> I'm afraid that doing such search by searching all emails and then
>>> iterating to check each of them for url_string will be disastrous in
>>> terms of performance, when the database grows, so I'd prefer to use
>>> sql for it.
>> There are 3 ways:
>>         1- add a full text search table and embed email address in  SearchableText
>>         2- add a dedicated table for email search
> 
> In case (2), do I have to overwrite the Email.reindexObject method, to
> make it run one more zssql method to update also the email table?

Ok, got it - a new wiki page is coming soon :)

Bartek

> 
> Bartek
> 
>>         3- add a column to the catalog
>>
>> 1- is the most generic (it is implemented here if you need it
>> http://cvs.erp5.org/erp5_bt5/erp5_web/CatalogMethodTemplateItem/portal_catalog/erp5_mysql/)
>> 2- is OK because it does not break existing things
>> 3- is only acceptable in case you need to do a lot of search and do not care
>> breaking standard setup
>>
>> JPS.
>>
>>
>>> Bartek
>>> _______________________________________________
>>> Erp5-dev mailing list
>>> Erp5-dev at erp5.org
>>> http://erp5.org/mailman/listinfo/erp5-dev
>> --
>> Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
>> Nexedi: Consulting and Development of Libre / Open Source Software
>> http://www.nexedi.com
>> ERP5: Libre/ Open Source ERP Software for small and medium companies
>> http://www.erp5.org
>> Rentalinux: Desktop Linux Server
>> http://www.rentalinux.com
>>
>> _______________________________________________
>> Erp5-dev mailing list
>> Erp5-dev at erp5.org
>> http://erp5.org/mailman/listinfo/erp5-dev
>>
> _______________________________________________
> Erp5-dev mailing list
> Erp5-dev at erp5.org
> http://erp5.org/mailman/listinfo/erp5-dev
> 
> 


-- 
"Software is largely a service industry operating under the persistent 
but unfounded delusion that it is a manufacturing industry."
Eric S.Raymond, "The Magic Cauldron"



More information about the Erp5-dev mailing list