note 113454 added to solr.examples

From: Date: Sat, 12 Oct 2013 14:24:13 +0000
Subject: note 113454 added to solr.examples
Groups: php.notes 
Request: Send a blank email to php-notes+get-196536@lists.php.net to get a copy of this message
As of solr 4.0 the waitFlush parameter is removed. If you're using the solr 4.0 or later version (and you have to),when you do this <?php $client->commit(); ?> you will get a solr error like this: "Unknown commit parameter 'waitFlush'." If you insist on using this PHP Solr extension and solr 4.0 or later version,you can edit the extension's source (version 1.0.2) php_solr_client.c. for the SolrClient's optimize method: at line 1490 : zend_bool waitFlush = 1, waitSearcher = 1; after edited: zend_bool waitSearcher = 1; at line 1493: char *waitFlushValue, *waitSearcherValue; after edited: zend_bool waitSearcher = 1; at line 1502: if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sbb", &maxSegments, &maxSegmentsLen, &waitFlush, &waitSearcher) == FAILURE) { after editd: if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sb", &maxSegments, &maxSegmentsLen, &waitSearcher) == FAILURE) { remove the line 1509 and 1515. And do the same edit for the SolrClient's commit method at line 1561,1564,1573 and remove the line 1580,1586 The final step, compile the code and install it. Good luck! ---- Server IP: 220.181.129.130 Probable Submitter: 219.136.28.73 ---- Manual Page -- http://php.net/manual/en/solr.examples.php Edit -- https://master.php.net/note/edit/113454 Del: integrated -- https://master.php.net/note/delete/113454/integrated Del: useless -- https://master.php.net/note/delete/113454/useless Del: bad code -- https://master.php.net/note/delete/113454/bad+code Del: spam -- https://master.php.net/note/delete/113454/spam Del: non-english -- https://master.php.net/note/delete/113454/non-english Del: in docs -- https://master.php.net/note/delete/113454/in+docs Del: other reasons-- https://master.php.net/note/delete/113454 Reject -- https://master.php.net/note/reject/113454 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#196536) next »