lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SolPHP" by israelekpo
Date Mon, 23 Nov 2009 20:59:12 GMT
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 israelekpo.
http://wiki.apache.org/solr/SolPHP?action=diff&rev1=22&rev2=23

--------------------------------------------------

  '''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: /!\
  
@@ -12, +11 @@

  - abstract out more of the logic into configurable variables
  
  - add back in the logging and debugging classes that clean up the "echo" calls
- 
  
  '''Alternative Client Contributed by Donovan Jimenez:'''
  
@@ -37, +35 @@

  
  The php extension can be downloaded from the [[http://pecl.php.net/package/solr|Apache Solr
PECL project]] home 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 :
  
   * Built in support for adding, deleting, optimizing, searching, rollback.
@@ -50, +52 @@

   * Advanced HTTP client that provides built-in support for connecting to Solr servers secured
behind HTTP Authentication or HTTP proxy servers.
   * Ability to obtain SolrInputDocument objects from SolrDocument in query response for possible
resubmission or updates.
   * Automatic parsing of Solr response into native php objects whose properties can be accessed
as array keys or object properties without any additional configuration on the client-side.
This is simplified interface to access server response data. Solr Objects can be treated as
arrays or objects.
-  * Also the SolrDocument retrieved from the query response implements the following interfaces
which gives the developer several options on how to manipulate the response : ArrayAccess,
Iterator, Traversable, Serializable. 
+  * Also the SolrDocument retrieved from the query response implements the following interfaces
which gives the developer several options on how to manipulate the response : ArrayAccess,
Iterator, Traversable, Serializable.
-  
  
  The extension currently uses version 2.2 of the xml response format internally.
  
@@ -61, +62 @@

  
  $ pecl install solr-beta
  
- 
  '''Using Solr's PHP Output (Solr Version >=1.3)'''
  
  Solr has a PHP response format that outputs an array (as PHP code) which can be eval'd.
@@ -69, +69 @@

  https://issues.apache.org/jira/browse/SOLR-196
  
  Example usage:
+ 
  {{{
  $code = file_get_contents('http://localhost:8983/solr/select?q=iPod&wt=php');
  eval("\$result = " . $code . ";");
  print_r($result);
  }}}
- 
  '''Using Solr's PHP Serialized Output (Solr Version >=1.3)'''
  
  Solr has a PHP response format that outputs a serialized array.
@@ -82, +82 @@

  https://issues.apache.org/jira/browse/SOLR-196
  
  Example usage:
+ 
  {{{
  $serializedResult = file_get_contents('http://localhost:8983/solr/select?q=iPod&wt=phps');
  $result = unserialize($serializedResult);
  print_r($result);
  }}}
+ In order to use either PHP or Serialized PHP Response Writers, you may first need to uncomment
these two lines in your solrconfig.xml:
  
- In order to use either PHP or Serialized PHP Response Writers, you may first need to uncomment
these two lines in your solrconfig.xml:
  {{{
  <queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
  <queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
  }}}
- 
  ----
  CategoryQueryResponseWriter
  

Mime
View raw message