Starting point for the Solr API. Represents a Solr server resource and has methods for pinging, adding, deleting, committing, optimizing and searching.
Example Usage:
Located in /Service.php (line 86)
Whether Apache_Solr_Response objects should have multivalue fields with only a single value collapsed to appear as a single value would.
Whether Apache_Solr_Response objects should create Apache_Solr_Documents in the returned parsed data
Server identification strings
HTTP Transport implementation (pluggable)
How NamedLists should be formatted in the output. This specifically effects facet counts. Valid values are Apache_Solr_Service::NAMED_LIST_MAP (default) or Apache_Solr_Service::NAMED_LIST_FLAT.
Constructed servlet full path URLs
Query delimiters. Someone might want to be able to change these (to use & instead of & for example), so I've provided them.
Keep track of whether our URLs have been constructed
Escape a value for special query characters such as ':', '(', ')', '*', '?', etc.
NOTE: inside a phrase fewer characters need escaped, use Apache_Solr_Service::escapePhrase() instead
Escape a value meant to be contained in a phrase for special query characters
Convenience function for creating phrase syntax from a value
Raw Add Method. Takes a raw post body and sends it to the update service. Post body should be a complete and well formed "add" xml document.
Add a Solr Document to the index
Add an array of Solr Documents to the index all at once
Send a commit command. Will be synchronous unless both wait parameters are set to false.
Raw Delete Method. Takes a raw post body and sends it to the update service. Body should be a complete and well formed "delete" xml document
Create a delete document based on document ID
Create and post a delete document based on multiple document IDs.
Create a delete document based on a query and submit it
Use Solr Cell to extract document contents. See http://wiki.apache.org/solr/ExtractingRequestHandler for information on how to use Solr Cell and what parameters are available.
NOTE: when passing an Apache_Solr_Document instance, field names and boosts will automatically be prepended by "literal." and "boost." as appropriate. Any keys from the $params array will NOT be treated this way. Any mappings from the document will overwrite key / value pairs in the params array if they have the same name (e.g. you pass a "literal.id" key and value in your $params array but you also pass in a document isntance with an "id" field" - the document's value(s) will take precedence).
Use Solr Cell to extract document contents. See http://wiki.apache.org/solr/ExtractingRequestHandler for information on how to use Solr Cell and what parameters are available.
NOTE: when passing an Apache_Solr_Document instance, field names and boosts will automatically be prepended by "literal." and "boost." as appropriate. Any keys from the $params array will NOT be treated this way. Any mappings from the document will overwrite key / value pairs in the params array if they have the same name (e.g. you pass a "literal.id" key and value in your $params array but you also pass in a document isntance with an "id" field" - the document's value(s) will take precedence).
Use Solr Cell to extract document contents. See http://wiki.apache.org/solr/ExtractingRequestHandler for information on how to use Solr Cell and what parameters are available.
NOTE: when passing an Apache_Solr_Document instance, field names and boosts will automatically be prepended by "literal." and "boost." as appropriate. Any keys from the $params array will NOT be treated this way. Any mappings from the document will overwrite key / value pairs in the params array if they have the same name (e.g. you pass a "literal.id" key and value in your $params array but you also pass in a document isntance with an "id" field" - the document's value(s) will take precedence).
Get the current state of the collapse single value arrays flag.
Get the current state of teh create documents flag.
Get the current default timeout setting (initially the default_socket_timeout ini setting) in seconds
Get the current configured HTTP Transport
Get the current setting for named list treatment.
Constructor. All parameters are optional and will take on default values if not specified.
Send an optimize command. Will be synchronous unless both wait parameters are set to false.
Call the /admin/ping servlet, can be used to quickly tell if a connection to the server is able to be made.
Simple Search interface
Set the collapse single value arrays flag.
Set the create documents flag. This determines whether Apache_Solr_Response objects will parse the response and create Apache_Solr_Document instances in place.
Set the default timeout for all calls that aren't passed a specific timeout
Set the host used. If empty will fallback to constants
Set the HTTP Transport implemenation that will be used for all HTTP requests
Set how NamedLists should be formatted in the response data. This mainly effects the facet counts format.
Set the path used. If empty will fallback to constants
Set the port used. If empty will fallback to constants
Set the string used to separate the path form the query string.
Defaulted to '?'
Set the string used to separate the parameters in thequery string Defaulted to '&'
Call the /admin/threads servlet and retrieve information about all threads in the Solr servlet's thread group. Useful for diagnostics.
Return a valid http URL given this server's host, port and path and a provided servlet name
Create an XML fragment from a Apache_Solr_Document instance appropriate for use inside a Solr add call
Central method for making a get operation against this Solr Server
Central method for making a post operation against this Solr Server
Replace control (non-printable) characters from string that are invalid to Solr's XML parser with a space.
Search HTTP Methods
NamedList Treatment constants
Servlet mappings
Response writer we'll request - JSON. See http://code.google.com/p/solr-php-client/issues/detail?id=6#c1 for reasoning
SVN ID meta data for this class
SVN Revision meta data for this class
Documentation generated on Wed, 04 May 2011 11:01:19 -0400 by phpDocumentor 1.4.3