Forums / Developer / ezsearch

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

eZ debug

Timing: Jan 18 2025 21:14:02
Script start
Timing: Jan 18 2025 21:14:02
Module start 'content'
Timing: Jan 18 2025 21:14:02
Module end 'content'
Timing: Jan 18 2025 21:14:02
Script end

Main resources:

Total runtime0.1657 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 587.5313180.8516
Module start 'content' 0.00680.0047 768.382897.9375
Module end 'content' 0.01160.1540 866.3203529.2109
Script end 0.1656  1,395.5313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.1855200.0002
Check MTime0.00140.8611200.0001
Mysql Total
Database connection0.00070.440110.0007
Mysqli_queries0.118171.29871410.0008
Looping result0.00130.75781390.0000
Template Total0.153792.810.1537
Template load0.00090.519110.0009
Template processing0.152892.239810.1528
Override
Cache load0.00060.365810.0006
Sytem overhead
Fetch class attribute can translate value0.00090.530010.0009
XML
Image XML parsing0.00030.165310.0003
General
dbfile0.00261.5870200.0001
String conversion0.00000.003030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

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

Time used to render debug report: 0.0002 secs