[Erp5-dev] Search text

Vincent Pelletier vincent at nexedi.com
Thu Jun 28 15:26:45 CEST 2012


Hi.

On Thu, 28 Jun 2012 13:56:46 +0200,
pavel lstiburek <plstiburek at gmail.com> wrote :
> address fulltext
[...]
> Search Key: Default (ExactMatch)
[...]
> Search Key to Keyword

This seems to be the root of the issue you are encountering:
As you probably already know, "fulltext" is a kind of SQL index (in
addition of being a catalog column setting to lookup valued indexed
with fulltext SQL indexes).

The "Address (Fulltext)" listbox column you made visible (IIRC it is
not visible by default) is configured to use such fulltext index, which
internally uses the "SearchableText" column, located in the "full_text"
table - which as you guess has a fulltext index on that column.

This also means that the relevant SearchKey configuration is on the
"SearchableText" column, which should use the FullText SearchKey to
work properly (ie, to actually use the fulltext index, which requires
a different SQL output from other types of indexes).

> After switching Address Search Key to Keyword, results are better
> (150 records), BUT after switching to next page it is showing page
> 2 / 35 - 700 records.

This is very surprising indeed. If you can reproduce it reliably, could
you run the following python script after the first lookup and after
the second ?

portal = context.getPortalObject()
return portal.portal_catalog(
  src__=1,
  **portal.portal_selections.getSelectionParamsFor(
    'person_module_selection'))

You may strip the list of values compared with "security_uid" column,
in order to reduce verbosity.

In order to reproduce the issue, I'll need to know better what you
installed:
- How did you install your ERP5 instance, and which version ?
  If it is a vifib.net-managed instance, please send me directly
  (off-list, in a separate mail) its identifier as displayed
  in your admin space ("SOFTINST-" followed by a serie of numbers).
  If it is a local slapos installation using slapproxy, please give me
  the URL you used (the one you gave as a parameter to
  slap.registerSuply().supply()).
- Which fulltext business template did you install before installing
  erp5_base ? (myisam, sphinxse or mroonga)

Regards,
-- 
Vincent Pelletier
ERP5 - open source ERP/CRM for flexible enterprises


More information about the Erp5-dev mailing list