Reference Implementation for using multiple Solr services in a distribution. Functionality
includes: routing of read / write operations failover (on selection) for multiple read servers
Located in /Service/Balancer.php (line 51)
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
Constructor. Takes arrays of read and write service instances or descriptions
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
Adds a service instance or service descriptor (if it is already not added)
Adds a service instance or service descriptor (if it is already not added)
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).
Get the current state of teh create documents flag.
Send an optimize command. Will be synchronous unless both wait parameters are set to false.
Removes a service instance or descriptor from the available services
Removes a service instance or descriptor from the available services
Simple Search interface
Set the create documents flag. This determines whether Apache_Solr_Response objects will parse the response and create Apache_Solr_Document instances in place.
Generates a service ID
Iterate through available read services and select the first with a ping that satisfies configured timeout restrictions (or the default)
Iterate through available write services and select the first with a ping that satisfies configured timeout restrictions (or the default)
Iterate through available write services and select the first with a ping
that satisfies configured timeout restrictions (or the default). The timeout period will increase until a connection is made or the limit is reached. This will allow for increased reliability with heavily loaded server(s).
Documentation generated on Wed, 04 May 2011 11:01:10 -0400 by phpDocumentor 1.4.3