Page 1 of 1

Trouble of searching with arabic name using sdkphp

PostPosted:Sat Sep 19, 2015 8:54 am
by rashedmohajer
Hello
I have a problem in the search ...
This error appeared
Code: Select all
Notice: Trying to get property of non-object in C:\wamp\www\report\sdk4php-2.0.5\sdk4php\src\openkm\impl\SearchImpl.php on line 128

Warning: Invalid argument supplied for foreach() in C:\wamp\www\report\sdk4php-2.0.5\sdk4php\src\openkm\impl\SearchImpl.php on line 128
getAllSearchs
my code
Code: Select all
//find
$queryParams = new QueryParams();
$queryParams->setDomain(QueryParams::DOCUMENT + QueryParams::FOLDER);
//$queryParams->setName('test');
$queryParams->setFolder("/okm:root/الترقيات/");
$queryParams->setFolderRecursive(true);

$properties = array();
$properties[self::PROPERTY_SUST_SUBJECT] = 'ترقيات الاساتذه';
$properties[self::PROPERTY_SUST_DATE] = '20150901000000,20150915000000';
$queryParams->setProperties($properties);

$keywords = array();
$keywords[] = 'اجتماع';
$queryParams->setKeywords($keywords);

$queryResults = $this->ws->find($queryParams);
foreach ($queryResults as $queryResult) {
    $this->printQueryResult($queryResult, 'find');
}
hint: openkm version 6.3.0 communty
i have arabic keywords,metadata,document's name
i attach sdkphp her

Re: Trouble of searching with arabic name using sdkphp

PostPosted:Sat Sep 19, 2015 5:34 pm
by jllort
which sdk version are you using ?

Re: Trouble of searching with arabic name using sdkphp

PostPosted:Sun Sep 20, 2015 5:30 am
by rashedmohajer
hi
i used The attached sdk from this fourm , i don know its vrsion

Re: Trouble of searching with arabic name using sdkphp

PostPosted:Sun Sep 20, 2015 5:15 pm
by jllort
You should use this version:
http://wiki.openkm.com/index.php/SDK_for_PHP_1.0.1

I suspect you're using sdk for php version for professional not for community and have several differences ( basically are not compatible ). Please try downloading the version from the link, and let us to know how goes.

Re: Trouble of searching with arabic name using sdkphp

PostPosted:Sun Sep 20, 2015 5:46 pm
by rashedmohajer
hi
by useing Sdk4php-1.0.1
Firstly /*$queryParams->setFolder("/okm:root/الترقيات/") and $queryParams->setFolderRecursive(true); */ not work
Secondly this sdk not support search by metadata
/*$properties = array();
$properties['okp:sust.subject'] = 'ترقيات الاساتذه';
$properties['okp:sust.subject_date'] = '20150901000000,20150915000000';
$queryParams->setProperties($properties);*/
Finally I want use arabic name for document

hint ...
I think my attachment sdk in this post is the best one for arabic and i test to set metadata and work will but search not work
this sdk from this fourm
by sochoa
post title (Re: get folders and their children names in Arabic use php sdk not work)

Re: Trouble of searching with arabic name using sdkphp

PostPosted:Mon Sep 21, 2015 8:35 pm
by jllort
The API of professional version is not the same API from community version, if you're using sdk 2.0 ( only professional version ) will not going right on almost cases, you should use 1.0. Actually we're finishing a new release of sdk for php professional, after be finished will be released a new version of sdk for php community. If sdk for php community version it does not support properties now, should wait until next version ( but use the sdk for professional with not solve the problem, because the API is not the same ).

Re: Trouble of searching with arabic name using sdkphp

PostPosted:Tue Sep 22, 2015 7:45 am
by rashedmohajer
my dear
i know the difference between tow API but this sdk solve the problem of Arabic name of document and set ,get metadata .

anyway
How long i have to wait for anew sdk version for community.

because
i need it to discussing my graduation project On the tenth of October ,

Re: Trouble of searching with arabic name using sdkphp

PostPosted:Thu Sep 24, 2015 9:29 am
by jllort
I think we will need about 1 month to release a new version of the sdk for php, actually we're still finishing with 2.3.0 and creating a new documentation for it. Meanwhile could you check with demo.openkm.com to see if there goes right or not ( or in a trial ). If you check on professional version we can advance on the problem ( be sure you're using wrong sdk version or if there's other kind of problem try to solve there ).