Page 1 of 1

basic advanced search using sdkphp

Posted: Tue Sep 08, 2015 3:13 pm
by rashedmohajer
hi
i try to search document ( data range between tow date in specific folder)
using sdkphp

Re: basic advanced search using sdkphp

Posted: Thu Sep 10, 2015 4:06 pm
by sochoa
Hello

Which OpenKM version are you using ?

Re: basic advanced search using sdkphp

Posted: Sat Sep 12, 2015 10:09 am
by rashedmohajer
hi
version 6.3.0 build 8156 communtiy

this is not work

Code: Select all

//find
$keywords = array();
$keywords[] = 'اتفاقيات';
$queryParams = new QueryParams();
$queryParams->setDomain(QueryParams::DOCUMENT + QueryParams::FOLDER);
$queryParams->setKeywords($keywords);
$queryParams->setName('علي  يوسف.docx');
//$queryParams->setAuthor('okmAdmin');
$queryParams->setFolder("/okm:root/ملفات");
$queryParams->setLastModifiedFrom('2015-11-5');
$queryParams->setLastModifiedTo('2015-12-5');
// $queryParams->setPath("/okm:root/a/");
$queryResults = $this->ws->find($queryParams);

foreach ($queryResults as $queryResult) {
      $this->printQueryResult($queryResult, 'find');
}
i whant to search with arabic name of document

Re: basic advanced search using sdkphp

Posted: Sun Sep 13, 2015 9:26 am
by jllort
My suggestion is try from simple query ( less filtering fields ) to more complete and then see from which parameter the query does not return the expected results. Then will be able to help you better.

Re: basic advanced search using sdkphp

Posted: Thu Sep 17, 2015 2:40 pm
by rashedmohajer
hi,

Code: Select all

$queryParams->setLastModifiedFrom('2015-11-5 00:00:00');
$queryParams->setLastModifiedTo('2015-12-5 00:00:00');
does not work for me.

Re: basic advanced search using sdkphp

Posted: Fri Sep 18, 2015 12:19 pm
by sochoa
Hi,

The pattern for the date is 'yyyyMMddHHmmss'. Example:

Code: Select all

$queryParams->setLastModifiedFrom('2015115000000');
$queryParams->setLastModifiedTo('2015125000000');