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.

eZ debug

Timing: Jan 31 2025 03:39:05
Script start
Timing: Jan 31 2025 03:39:05
Module start 'layout'
Timing: Jan 31 2025 03:39:05
Module start 'content'
Timing: Jan 31 2025 03:39:05
Module end 'content'
Timing: Jan 31 2025 03:39:05
Script end

Main resources:

Total runtime0.0195 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 590.0313151.2109
Module start 'layout' 0.00420.0031 741.2422220.6875
Module start 'content' 0.00720.0111 961.9297997.7891
Module end 'content' 0.01830.0011 1,959.718833.9922
Script end 0.0195  1,993.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002211.3689140.0002
Check MTime0.00104.8951140.0001
Mysql Total
Database connection0.00073.461910.0007
Mysqli_queries0.00199.576230.0006
Looping result0.00000.056310.0000
Template Total0.00084.110.0008
Template load0.00063.298010.0006
Template processing0.00020.785110.0002
Override
Cache load0.00052.379710.0005
General
dbfile0.00199.725380.0002
String conversion0.00000.026940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs