You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2014/03/09 15:46:39 UTC
[Solr Wiki] Update of "SolPHP" by OmarShaban
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "SolPHP" page has been changed by OmarShaban:
https://wiki.apache.org/solr/SolPHP?action=diff&rev1=28&rev2=29
Comment:
Updated outdated information about the extension + Support for solr 4
<<TableOfContents(3)>>
== solr-php-client ==
- A 3rd party PHP library for indexing and searching documents within an Apache Solr installation.
+ A 3rd party PHP library for indexing and searching documents within an Apache Solr installation.
Zip / Tarballs can be found at [[http://code.google.com/p/solr-php-client/downloads/list|SolrPhpClient]]
@@ -14, +14 @@
* See link above for example usage and further documentation
== Apache Solr PHP Extension ==
-
The Apache Solr PECL extension is a light-weight, feature-rich library that allows developers using Apache Solr via PHP to communicate easily and efficiently with the Solr web service using an object-oriented API.
- The documentation for the PECL extension contains instructions on how to install the extension and is available in the [[http://us.php.net/manual/en/book.solr.php|PHP Manual]] under Search Engine Extensions.
+ The documentation for the PECL extension contains instructions on how to install the extension and is available in the [[http://docs.php.net/manual/en/book.solr.php|PHP Manual]] under Search Engine Extensions.
- Sometimes, the official documentation may take a while to update. The documentation for the Solr PECL extension is constantly being updated from time to time.
+ There are 2 parallel releases of the extension:
- If you are unable to find some information on the official PHP manual, please [[http://docs.php.net/manual/en/book.solr.php|check here]]
+ * PECL Apache Solr Extension 1.x which supports Apache Solr Server 3.x
+ * PECL Apache Solr Extension 2.x which supports Apache Solr Server 4.0+
- The latest version of the PECL extension is 1.0.2 (2011-11-28)
-
- The php extension can be downloaded from the [[http://pecl.php.net/package/solr|Apache Solr PECL project]] home page.
+ The php extension can be downloaded from the [[http://pecl.php.net/package/solr|Apache Solr PECL project]] home page. Windows binaries can also be found on the extension's page.
-
- Thanks to Pierre-Alain Joye from php.net, the Windows DLL for php 5.3 can be downloaded here
-
- http://downloads.php.net/pierre/
A quick list of some of the features of the API include :
@@ -52, +46 @@
You may also install it by running the following command in the console :
- $ pecl install solr-beta
+ $ pecl install solr
== Solarium ==
- [[http://wiki.solarium-project.org/index.php/Main_Page|Solarium]] is a Solr client library for PHP applications that not only facilitates Solr communication but also tries to accurately model Solr concepts.
+ [[http://wiki.solarium-project.org/index.php/Main_Page|Solarium]] is a Solr client library for PHP applications that not only facilitates Solr communication but also tries to accurately model Solr concepts.
-
== Solr's PHP response format ==
Solr has a PHP response format that outputs an array (as PHP code) which can be eval'd.
@@ -68, +61 @@
eval("\$result = " . $code . ";");
print_r($result);
}}}
-
== Solr's PHP Serialized response format ==
-
Solr has a PHP response format that outputs a serialized array.
Example usage:
@@ -86, +77 @@
<queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
<queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
}}}
-
You can also use the new response writer plugin for PHP here
https://issues.apache.org/jira/browse/SOLR-1967
@@ -108, +98 @@
</queryResponseWriter
<code>
-
-
}}}
-
Also check out how to use it on the client side here
http://www.php.net/manual/en/solrclient.setresponsewriter.php
http://www.php.net/manual/en/solrclient.construct.php
+
----
CategoryQueryResponseWriter
== Historical ==
- ''Original Client Code Contributed By Brian Lucas:'''
+ ''Original Client Code Contributed By Brian Lucas:''' '''''
- There are two classes for PHP: [[https://issues.apache.org/jira/browse/SOLR-50|SolrUpdate]] and [[https://issues.apache.org/jira/browse/SOLR-51|SolrQuery]].
+ '''''There are two classes for PHP: [[https://issues.apache.org/jira/browse/SOLR-50|SolrUpdate]] and [[https://issues.apache.org/jira/browse/SOLR-51|SolrQuery]]. '''''
- /!\ :TODO: /!\
+ ''''' /!\ :TODO: /!\ '''''
- - clean up some of the XML writing code -- it's a tad "kludgy" right now.
+ '''''- clean up some of the XML writing code -- it's a tad "kludgy" right now. '''''
- - abstract out more of the logic into configurable variables
+ '''''- abstract out more of the logic into configurable variables '''''
- - add back in the logging and debugging classes that clean up the "echo" calls
+ '''''- add back in the logging and debugging classes that clean up the "echo" calls '''''