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 [email protected]

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.