Advanced Search Doesn't Work

Author Message

Willie Seabrook

Wednesday 03 March 2004 12:49:36 pm

Hi,

My user class has a number of attributes, including first_name, last_name and some others I have added. Initially, all the fields were not listed as 'Is Searchable' in the content class edit page. A whole bunch of users were added, and now I would like to be able to search through users. So I have ticked 'Is Searchable option' and save those modifications to the User class. I then updated the search index using updatesearchindex.php (first deleting all from ezsearch_word and ezsearch_object_word_link as instructed in the docs).

However, all of my user objects are still not available in search. Because I initially left out 'Is Searchable' option in the user class, does that mean none of those thousands of users will not be searchable? If so, I think this is a bug, and might anyone have a hack/fix for it? Or perhaps there is something I have forgotten to do? I did note that when I ran the script, it completed successfully and repopulated the ezsearch tables but the console did output 'sh: line 1: pstotext: command not found' a number of times.

Regards,
Willie

Willie Seabrook

Wednesday 03 March 2004 7:23:32 pm

The problem is in the updatesearchindex.php.

On line number 382 you need to change:

$node =& eZContentObjectTreeNode::fetch( 2 );

to:

$node =& eZContentObjectTreeNode::fetch( $topLevelNodeID );

to force it to recursively index all top level nodes - content (top level node_id=2) *and* user (top level node_id=5)

I don't understand this script in detail so I may have done something wrong. However, my search now works 100% correctly. I'm using ezpublish 3.3 by the way so this bug may have been fixed in 3.4, but I couldn't find anything about it in the changelog.

Regards,
Willie

Kåre Køhler Høvik

Wednesday 03 March 2004 11:47:18 pm

updatesearchindex.php was rewritten in 3.3-3 I think to also index User objects and other top nodes. You can use the script from that release to make sure everything is reindex properly.

--
Kåre Høvik

Kåre Høvik

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.