ezsearch

Author Message

gregor de Lijzer

Wednesday 20 July 2005 9:06:33 am

Unfortunately the documentation on ezsearch is quitepoor.
i wrote a test script to check out the functionality of ezSearch:

include_once("kernel/classes/ezsearch.php");
$searchArray=&eZSearch::buildSearchArray();

$searchText="Feuerstein";
$searchContentClassID=24;
$searchContentClassAttributeID=205;
$searchResult=& eZSearch::search($searchText,
                                 array('SearchContentClassID'=>$searchContentClassID,
                                       'SearchContentClassAttributeID'=>$searchContentClassAttributeID),
                                       $searchArray);
var_dump($searchResult);

this simple example returns:

C:\Programme\Apache Group\Apache\htdocs\ez\test>php -q search.php
PHP Warning: in_array(): Wrong datatype for second argument in c:\Programme\Apache Group\Apache\htdocs\ez\lib\ezi18n\classes\ezchartransform.php on line 249
PHP Notice: Undefined index: wildCardCount in c:\Programme\Apache Group\Apache
\htdocs\ez\kernel\search\plugins\ezsearchengine\ezsearchengine.php on line 640
PHP Warning: array_keys(): The first argument should be an array in c:\Programme\Apache Group\Apache\htdocs\ez\kernel\search\plugins\ezsearchengine\ezsearchengine.php on line 1956
PHP Warning: Invalid argument supplied for foreach() in c:\Programme\Apache Gro
up\Apache\htdocs\ez\kernel\search\plugins\ezsearchengine\ezsearchengine.php on line 1956
PHP Warning: Invalid argument supplied for foreach() in c:\Programme\Apache Gro
up\Apache\htdocs\ez\kernel\classes\datatypes\ezuser\ezuser.php on line 1515
PHP Warning: Invalid argument supplied for foreach() in c:\Programme\Apache Group\Apache\htdocs\ez\kernel\classes\ezrole.php on line 512

array(3) {
["SearchResult"]=>
array(0) {
}
["SearchCount"]=>
NULL
["StopWordArray"]=>
array(0) {
}
}

meaning no result. the object itself exists. Where can i get more info on ezSearch? Anyone else had problems with ezSearch? Using ezp 3.6

greg

gregor de Lijzer

Thursday 21 July 2005 5:44:06 am

having a look in the var.log file isn't the worst idea. but this doesn't tell me nothing. Do i have to create that groups in ezp?

the error.log file says:

[ Jul 21 2005 14:52:27 ] [] Undefined group: 'DatabaseSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'DatabaseSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'DatabaseSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'DatabaseSettings'
[ Jul 21 2005 14:52:27 ] [] Database implementation not supported:
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'FileSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'FileSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'Transformation'
[ Jul 21 2005 14:52:27 ] [] Transformation group search is not part of the active group list Groups in transform.ini
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'FileSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'FileSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'UserSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'RoleSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'RoleSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'FileSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'FileSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'RoleSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'RoleSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'FileSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'FileSettings'
[ Jul 21 2005 14:52:27 ] [] Undefined group: 'RegionalSettings'

Björn Dieding@xrow.de

Thursday 21 July 2005 6:21:28 am

I can't tell how you executed the script and even if it was a cli or web script.

Still I would say you didn't run this script in the a/the eZ publish environment.

Read about creating your own module / module development from the documentation

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

gregor de Lijzer

Thursday 21 July 2005 8:12:33 am

thanks björn!
Actually it was a cli script!
Does this mean that every little script i write that uses the ezp api has to be embedded in a module?

gregor

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 06:15:10
Script start
Timing: Jan 31 2025 06:15:10
Module start 'layout'
Timing: Jan 31 2025 06:15:10
Module start 'content'
Timing: Jan 31 2025 06:15:10
Module end 'content'
Timing: Jan 31 2025 06:15:10
Script end

Main resources:

Total runtime0.0115 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0038 588.0078151.1953
Module start 'layout' 0.00380.0018 739.203136.5938
Module start 'content' 0.00560.0046 775.796994.2344
Module end 'content' 0.01020.0013 870.031337.9922
Script end 0.0115  908.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002017.6701140.0001
Check MTime0.00108.2643140.0001
Mysql Total
Database connection0.00065.075810.0006
Mysqli_queries0.001714.508630.0006
Looping result0.00000.078710.0000
Template Total0.00108.510.0010
Template load0.00076.455610.0007
Template processing0.00021.982710.0002
Override
Cache load0.00054.570310.0005
General
dbfile0.001311.098580.0002
String conversion0.00000.060140.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