Apache_Solr_Service_Balancer::extract
Use Solr Cell to extract document contents. See {@link 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).
Signature
public function extract(string
$file,
[array
$params = ,
[Apache_Solr_Document
$document = NULL,
[string
$mimetype = 'application/octet-stream']]] )
Parameters
$file
— string- Path to file to extract data from
$params
— array- optional array of key value pairs that will be sent with the post (see Solr Cell documentation)
$document
— object- optional document that will be used to generate post parameters (literal.* and boost.* params)
$mimetype
— string- optional mimetype specification (for the file being extracted)
Returns
- Apache_Solr_Response
Errors/Exceptions
-
Apache_Solr_InvalidArgumentException
- if $file, $params, or $document are invalid.