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

Jean-Paul Smets jp at nexedi.com
Wed Mar 22 21:24:32 CET 2006


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
	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




More information about the Erp5-dev mailing list