i fixed but he still a smal prb from time out 30sc of wamp server then i can just put 130files to a directory to index untill i index all my files : this is my function idex document:
*App::import('Vendor','autoload',array('file'=>'solarium/vendor/autoload.php'));* *public function indexDocument(){* *$config = array(* * "endpoint" => array("localhost" => array("host"=>"127.0.0.1",* * "port"=>"8983", "path"=>"/solr", "core"=>"demo",)* * ) );* * $start = microtime(true);* *if($_POST){* * // create a client instance* *$client = new Solarium\Client($config);* *$dossier=$this->request->data['User']['dossier'];* *$dir = new Folder($dossier);* *$files = $dir->find('.*\.*');* * $headers = array('Content-Type:multipart/form-data');* *foreach ($files as $file) {* * $file = new File($dir->pwd() . DS . $file);* *$query = $client->createExtract();* *$query->setFile($file->pwd());* *$query->setCommit(true);* *$query->setOmitHeader(false);* *$doc = $query->createDocument();* *$doc->id =$file->pwd();* *$doc->name = $file->name;* *$doc->title = $file->name();* *$query->setDocument($doc);* *$request = $client->createRequest($query);* *$request->addHeaders($headers);* *$result = $client->executeRequest($request);* *}* *}* *$this->set(compact('start'));* *}* 2015-12-02 16:42 GMT+00:00 kostali hassan <med.has.kost...@gmail.com>: > yes I am sure because i successeflly Post the same document(455 .doc .docx > and pdf in 18 second) with SimplePostTool > But now i want to commincate directly with my server solr using solarium > in my application cakephp ; I think only way to have the right encoding is > in header : > *$headers = array('Content-Type:multipart/form-data');* > * I guess it will *working if the time of indexing is not depassing 30 > second from time out of wamp server. > > 2015-12-02 16:32 GMT+00:00 Gora Mohanty <g...@mimirtech.com>: > >> On 2 December 2015 at 21:55, kostali hassan <med.has.kost...@gmail.com> >> wrote: >> > yes they are a Error in my solr logs: >> > SolrException URLDecoder: Invalid character encoding detected after >> > position 79 of query string / form data (while parsing as UTF-8) >> > < >> http://stackoverflow.com/questions/34017889/solrexception-urldecoder-invalid-character-encoding-detected-after-position-79 >> > >> > this is my post in stack overflow : >> > >> http://stackoverflow.com/questions/34017889/solrexception-urldecoder-invalid-character-encoding-detected-after-position-79 >> >> Looks like an encoding error all right. Are you very sure that you can >> sucessfully POST the same document with SimplePostTool. If so, I would >> guess that you are not using Solarium correctly, i.e., the PDF file is >> getting POSTed such that Solr is getting the raw content rather than >> the extracted content. >> >> Regards, >> Gora >> > >