package.xml 0000644 0001750 0001750 00000160164 15001737315 012131 0 ustar biggi biggi
solr
pecl.php.net
The Apache Solr PHP extension is an extremely fast,
light-weight, feature-rich library that allows PHP applications to
communicate easily and efficiently with Apache Solr server instances
using an object-oriented API.
It effectively simplifies the process of interacting with Apache Solr using PHP.
The extension has features such as built-in, serializable query string builder objects which effectively simplifies the manipulation of name-value pair request parameters across repeated requests.
The response from the Solr server is also automatically parsed into native php objects whose properties can be accessed as array keys or object properties without any additional configuration on the client-side.
Its advanced HTTP client reuses the same connection across multiple requests and provides built-in support for connecting to Solr servers secured behind HTTP Authentication or HTTP proxy servers. It is also able to connect to SSL-enabled containers.
Please consult the documentation for more details on features. Included in the source code are phpdoc stubs that enable autocomplete of Solr classes and methods in IDE during development in userland.
Please consider staring the package on github, and get a free release ;)
https://github.com/php/pecl-search_engine-solr
Omar Shaban
omars
omars@php.net
yes
Birgir Haraldsson
biggi
biggi@stefna.is
yes
2025-04-22
2.8.1
2.8.1
stable
stable
PHP License
Fixes:
- Fix return type of SolrUtils::escapeQueryChars() (#83)
7.4.0
8.4.99
1.4.0
libxml
solr
2.8.1
2.8.1
stable
stable
2025-04-22
PHP License
Fixes:
- Fix return type of SolrUtils::escapeQueryChars() (#83)
2.8.0
2.8.0
stable
stable
2024-12-30
PHP License
Features:
- Support PHP 8.4
Internals:
- improve config.m4 and config.w32 (remicollet and petk)
2.7.0
2.7.0
stable
stable
2024-01-11
PHP License
Features:
- Support Highlight Query (#28)
- Support PHP 8.3
- Dropped Support for PHP 7.3 and below
API Changes:
- Added SolrQuery SolrQuery::setHighlightQuery(string $q)
- Added string SolrQuery::getHighlightQuery()
Bug Fixes:
- Fix parsed parameter types (#37)
- Fix compile error: libcurl on linux multi-arch support (#46)
- Fix SegFault in SolrClient::optimize() (debug mode)
- Fix Missing Windows DLLs (#51) / available on github releases now
- Fix curl checks for PHP 7.4+, use PKG_CONFIG (remicollet)
Internals:
- ci: windows tests (#51)
- parse_int macros
2.6.0
2.6.0
stable
stable
2022-11-09
PHP License
- PHP 8.1 compatible
- PHP 8.2 compatible
Omar Shaban
omars
omars@php.net
yes
2.5.1
2.5.1
stable
stable
2020-09-09
PHP License
- PHP 7.4 compatible
- PHP 7 windows support
- PHP 8.0.0beta3 compatible
- Bug #72740 Fixes NULL byte when using addQueryField() w/o boost
Omar Shaban
omars
omars@php.net
yes
2.5.0
2.5.0
stable
stable
2019-07-04
PHP License
- Atomic Updates (partials)
- Simple Optimistic Concurrency
- Compatibility with PHP 7.1, 7.2, 7.3, latest 7.4
- Enable gzip encoding if server supports it
- Fix Real Time Get requests fails if it wasn't the first request
- Fix addQueryField return wrong query
- Fix Solr Extension build fail with curl 7.19+
Omar Shaban
omars
omars@php.net
yes
2.4.0
2.4.0
stable
stable
2016-03-30
PHP License
- PHP 7 Support [Request #70696]
- Performance Optimizations
- Enabled SolrUtils::getSolrStats()
- Fix SolrException*::getInternalInfo
- Fix SolrQueryResponse::getRequestUrl returns wrong url with terms [Bug #71591]
- Fix SolrClient::deleteByIds Segfaults with invalid ids [Bug #71853]
- Fix SolrObject::offsetExists SegFault [Bug #71852]
- Fix float formatting with decimal comma [Bug #71568]
Omar Shaban
omars
omars@php.net
yes
2.3.0
2.3.0
stable
stable
2015-11-29
PHP License
- Support indexing child/nested documents [Request #70739]
- Support nested documents parsing SolrObject [Request #70953]
- Support nested documents parsing SolrDocument [Request #70974]
- Added maxScore to SolrResponse [Request #68610]
- Fixed issues on big endean processors (Remi Collet)
- Enhancements on method parameter naming (reflections)
Omar Shaban
omars
omars@php.net
yes
2.2.1
2.2.1
stable
stable
2015-09-27
PHP License
- Fix windows build
Omar Shaban
omars
omars@php.net
yes
2.2.0
2.2.0
stable
stable
2015-09-26
PHP License
- Support Real Time Get (Request #68647)
- Support Result Grouping (Request #68793)
- Support Field Collapsing (Request #70175)
- Support Expand Component (Request #70176)
- SolrMissingMandatoryParameterException (Request #70301)
- Fix SegFault on Solr Server 500 Response with no msg [xml RW] (Bug #69156)
- Fix SegFault on non-phpserialized 500 responses from Solr Server with PHPS RW (Bug #69156)
- Fix Failed to parse 500 error response when it lacks msg JSON/PHPS RW (Bug #70495, #70496)
- Fix compatibility tests with Solr Server 5 (Bug #70333)
- Fix Error unserializing raw response on statistics response having NaN as value (Bug #67394)
Omar Shaban
omars
omars@php.net
yes
2.1.0
2.1.0
stable
stable
2014-01-15
PHP License
- New Feature: SolrDisMaxQuery Builder (dismax/edismax) [Feature #67101]
- Support PHPS (PHP Serialized) Response Writer [Request #61329]
- SolrResponse::getArrayResponse [Feature #67660]
- SolrResponse::getResponse() returns SolrObject instead of array (with json response writer) [Bug #67579]
- Argument list parameter: Argument to value separator disappears [Bug #68179]
- Conflict Occurs When using SolrDisMax::addBoostQuery and setBoostQuery [Bug #68181]
- Doc Fix [Doc #67542]
- Internals: simple_list parameter type allow custom delimiter
- Internals: Allowed zero-length argument value
- Internals: Allowed zero-length argument-to-argument-value separator
- Security Fix
Omar Shaban
omars
omars@php.net
yes
2.0.0
2.0.0
stable
stable
2014-06-24
PHP License
- Introduced SolrServerException which handles exception responses produced by Solr Server [Feature #67063]
- SolrClient::commit $maxSegments removed
- Removed php curl extension dependency for static builds [Bug #59028]
- SolrParams/SolrModifiableParams/SolrQuery throws SolrIllegalArguments Exception instead of E_ERROR [Feature #66858]
- SolrQuery::__construct throws SolrIllegalArgumentException instead of E_ERROR
- Dropped Support for phpnative Response Writer
- Fix config that always enables solr debug [Bug #60361]
Omar Shaban
omars
omars@php.net
yes
1.1.1
1.1.1
stable
stable
2014-06-20
PHP License
- Fix Windows Build
Omar Shaban
omars
omars@php.net
yes
1.1.0
1.1.0
stable
stable
2014-06-19
PHP License
1.1.0 Stable
- Introduced SolrServerException which handles exception responses produced by Solr Server [Feature #67063]
- SolrClient::commit $maxSegments removed
- SolrQuery::__construct throws SolrIllegalArgumentException instead of E_ERROR
- Removed php curl extension dependency for static builds [Bug #59028]
From 1.1.0b
- SolrClient::system Access system servlet which fetch Solr Server System Information
- SolrClient::commit argument $maxSegments is now DEPRECATED
- SolrClient::commit Added support for expungeDeletes on
- All SolrClient methods throws SolrClientExceptions instead of E_WARNING + SolrClientException
- SolrClientExceptions' messages are more informative in case of connection errors
- Added json extension validation
- All SolrResponse, SolrQueryResponse, SolrUpdateResponse, SolrPingResponse, SolrGenericResponse, SolrDocument, and SolrInputDocument classes are now final
- All parameters functions throws SolrIllegalArgumentException instead of E_RROR
- SolrParams/SolrModifiableParams/SolrQuery throws SolrIllegalArguments Exception instead of E_ERROR [Feature #66858]
- Various Bug Fixes
Omar Shaban
omars
omars@php.net
yes
1.1.0b
1.1.0b
beta
beta
2014-03-17
PHP License
- SolrClient::system Access system servlet which fetch Solr Server System Information
- SolrClient::commit argument $maxSegments is now DEPRECATED
- SolrClient::commit Added support for expungeDeletes on
- All SolrClient methods throws SolrClientExceptions instead of E_WARNING + SolrClientException
- SolrClientExceptions' messages are more informative in case of connection errors
- Added json extension validation
- All SolrResponse, SolrQueryResponse, SolrUpdateResponse, SolrPingResponse, SolrGenericResponse, SolrDocument, and SolrInputDocument classes are now final
- All parameters functions throws SolrIllegalArgumentException instead of E_RROR
- SolrParams/SolrModifiableParams/SolrQuery throws SolrIllegalArguments Exception instead of E_ERROR (Feature #66858)
- Various Bug Fixes
Omar Shaban
omars
omars@php.net
yes
2.0.0b
2.0.0b
beta
beta
2014-02-28
PHP License
- Support Solr version 4.0+
- Added support for retreiving Solr Server system information through SolrClient
SolrClient::system()
- Support for softCommit
- Suppport for expungeDeletes
- maxSegments for commit is deprecated
- Added escape character / as per Solr 4 it is reserved for REGEX
- Disabled warnings for connection errors, SolrClientException is thrown
- SolrClientException messages for connection errors are more meaningful indicating error messages and codes
- API changes for:
SolrClient::commit($maxSegments = 0, $softCommit = false, $waitSearcher = true, $expungeDeletes = false)
SolrClient::optimize($maxSegments = 1, $softCommit = false, $waitSearcher = true)
SolrClient::addDocument(SolrInputDocument &$doc, $overwrite = true, $commitWithin = 0)
SolrClient::addDocuments(array &$docs, $overwrite = true, $commitWithin = 0)
- Several Bug Fixes
Warning: PECL Solr >= 2 is not compatible with Solr Server < 4.0
Israel Ekpo
iekpo
iekpo@php.net
yes
1.0.2
1.0.2
stable
stable
2011-11-29
PHP License
- Several Bug Fixes by Pierrick, Felipe and Tony
- Changes to make the code compile on 5.2.3 and greater
- Changes to Tests by Pierrick
Israel Ekpo
iekpo
iekpo@php.net
yes
1.0.1
1.0.1
stable
stable
2011-06-04
PHP License
- Added support for json response writer in SolrClient
- Removed final bit from classes so that they can be mocked in unit tests
- Changed from beta to stable
- Included phpdoc stubs in source to enable autocomplete of Solr classes and methods in IDE during development
- Lowered libxml2 version requirement to 2.6.16
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.11
0.9.11
beta
beta
2010-06-22
PHP License
- Added ability to specify response writer in constructor option
- Added new method to set response writer SolrClient::setResponseWriter()
- Currently, the only supported response writers are 'xml' and 'phpnative'
- Added support for new native Solr response writer
- New response writer is available at https://issues.apache.org/jira/browse/SOLR-1967
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.10
0.9.10
beta
beta
2010-05-04
PHP License
- Increased compatibility with older systems running CentOS 4 or 5 and RHEL4 or 5
- Added ability to compile directly without having to build libcurl and libxml2 from source on older systems
- Lowered minimum supported version for libcurl to 7.15.0 (Alex Samorukov)
- Lowered minimum supported version for libxml2 to 2.6.26 (Alex Samorukov)
- Fixed PECL Bug# 17172 MoreLikeThis only parses one doc (trevor at blubolt dot com, max at blubolt dot com)
- Declared workaround macros for SSL private key constants due to support for earlier versions of libcurl (Alex Samorukov)
- Changed extension version numbers to start using hexadecimal numbers (Israel Ekpo)
- Added instructions on how to attempt to compile on windows (Israel Ekpo)
- Fixed PECL Bug# 17292 sending UTF-8 encoding in header (giguet at info dot unicaen dot fr)
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.9
0.9.9
beta
beta
2010-01-10
PHP License
- Fixed Bug #17009 Creating two SolrQuery objects leads to wrong query value
- Reset the buffer for the request data from the previous request in SolrClient
- Added new internal static function solr_set_initial_curl_handle_options()
- Moved the intialization of CURL handle options to solr_set_initial_curl_handle_options() function
- Resetting the CURL options on the (CURL *) handle after each request is completed
- Added more explicit error message to indicate that cloning SolrParams objects and its descendants is currently not yet supported
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.8
0.9.8
beta
beta
2009-12-04
PHP License
- Fixed config.w32 for Windows build support (Pierre, Pierrick)
- Fixed Bug #16943 Segmentation Fault from solr_encode_string() during attempt to retrieve solrXmlNode->children->content when solrXmlNode->children is NULL (Israel)
- Disabled Expect header in libcurl (Israel)
- Disabled Memory Debugging when normal debug is enabled (Israel)
- Added list of contributors to the project
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.7
0.9.7
beta
beta
2009-11-17
PHP License
- Fixed bug 16924 AC_MSG_NOTICE() is undefined in autoconf 2.13
- Added new method SolrClient::getDebug()
- Modified SolrClient::__construct() so that port numbers and other integer values for the options can be passed as strings.
- Changed internal string handling mechanism to allow for tracking of memory allocation in debug mode.
- Lowered minimum php version to 5.2.3. Unfortunately, this is the lowest PHP version that will be supported. PHP versions lower than 5.2.3 are not compatible or are causing tests to FAIL.
- Added php stubs for code-completion assists in IDEs and editors.
- Added more examples
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.6
0.9.6
beta
beta
2009-11-01
PHP License
Reduced minimum php version to 5.2.4
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.5
0.9.5
beta
beta
2009-10-27
PHP License
Added support for secure connections to SSL-enabled Solr servers (SSL/HTTPS).
Made connection errors more verbose.
The following options where added to the SolrClient constructor :
- secure (Boolean value indicating whether or not to connect in secure mode)
- timeout (This is maximum time in seconds allowed for the http data transfer operation. Default is 30 seconds)
- ssl_cert (File name to a PEM-formatted file containing the private key + private certificate (concatenated in that order) )
- ssl_key (File name to a PEM-formatted private key file only)
- ssl_keypassword (Password for private key)
- ssl_cainfo (Name of file holding one or more CA certificates to verify peer with)
- ssl_capath (Name of directory holding multiple CA certificates to verify peer with )
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.4
0.9.4
beta
beta
2009-10-23
PHP License
Fixed bug 16897 - ap_php_vasprintf not available in 5.2.11
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.3
0.9.3
beta
beta
2009-10-19
PHP License
- Corrected configuration options for automated installation via PECL. Removed extra hyphens.
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.2
0.9.2
beta
beta
2009-10-19
PHP License
- Fixed bug #16874 Added explanation in documentation
- Updated SolrParams::__toString() - modified to return name-value pair list instead of serialized object string
- Added the following methods to SolrParams :
SolrParams::toString()
SolrParams::getParam()
- Created the following aliases in SolrParams :
SolrParams::set()
SolrParams::add()
SolrParams::get()
- Added the following methods to SolrQuery :
SolrQuery::getQuery()
SolrQuery::getStart()
SolrQuery::getRows()
SolrQuery::getFields()
SolrQuery::getSortFields()
SolrQuery::getFilterQueries()
SolrQuery::getTimeAllowed()
SolrQuery::getFacet()
SolrQuery::getFacetFields()
SolrQuery::getFacetQueries()
SolrQuery::getFacetPrefix()
SolrQuery::getFacetSort()
SolrQuery::getFacetLimit()
SolrQuery::getFacetOffset()
SolrQuery::getFacetMinCount()
SolrQuery::getFacetMissing()
SolrQuery::getFacetMethod()
SolrQuery::getFacetDateFields()
SolrQuery::getFacetDateStart()
SolrQuery::getFacetDateEnd()
SolrQuery::getFacetDateGap()
SolrQuery::getFacetDateHardEnd()
SolrQuery::getFacetDateOther()
SolrQuery::getHighlight()
SolrQuery::getHighlightFields()
SolrQuery::getHighlightSnippets()
SolrQuery::getHighlightFragsize()
SolrQuery::getHighlightMergeContiguous()
SolrQuery::getHighlightRequireFieldMatch()
SolrQuery::getHighlightMaxAnalyzedChars()
SolrQuery::getHighlightAlternateField()
SolrQuery::getHighlightMaxAlternateFieldLength()
SolrQuery::getHighlightFormatter()
SolrQuery::getHighlightSimplePre()
SolrQuery::getHighlightSimplePost()
SolrQuery::getHighlightFragmenter()
SolrQuery::getHighlightUsePhraseHighlighter()
SolrQuery::getHighlightHighlightMultiTerm()
SolrQuery::getHighlightRegexSlop()
SolrQuery::getHighlightRegexPattern()
SolrQuery::getHighlightRegexMaxAnalyzedChars()
SolrQuery::getStats()
SolrQuery::getStatsFields()
SolrQuery::getStatsFacets()
SolrQuery::getMlt()
SolrQuery::getMltCount()
SolrQuery::getMltFields()
SolrQuery::getMltQueryFields()
SolrQuery::getMltMinTermFrequency()
SolrQuery::getMltMinDocFrequency()
SolrQuery::getMltMinWordLength()
SolrQuery::getMltMaxWordLength()
SolrQuery::getMltMaxNumTokens()
SolrQuery::getMltMaxNumQueryTerms()
SolrQuery::getMltBoost()
SolrQuery::getTerms()
SolrQuery::getTermsField()
SolrQuery::getTermsLowerBound()
SolrQuery::getTermsUpperBound()
SolrQuery::getTermsIncludeLowerBound()
SolrQuery::getTermsIncludeUpperBound()
SolrQuery::getTermsMinCount()
SolrQuery::getTermsMaxCount()
SolrQuery::getTermsPrefix()
SolrQuery::getTermsLimit()
SolrQuery::getTermsReturnRaw()
SolrQuery::getTermsSort()
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.1
0.9.1
beta
beta
2009-10-07
PHP License
- Fixed bug #16864 (Build failure in Non-ZTS builds)
Israel Ekpo
iekpo
iekpo@php.net
yes
0.9.0
0.9.0
beta
beta
2009-10-05
PHP License
- Initial release after approximately 10 months of development and 3 weeks of testing. This is the beta version. Some of the features may be modified in future releases.
solr-2.8.1/examples/bootstrap.php 0000664 0001750 0001750 00000000042 15001737315 015771 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query = new SolrQuery('*:*');
$query->setFacet(true);
$query->addFacetField('cat')->addFacetField('name')->setFacetMinCount(2);
$updateResponse = $client->query($query);
$response_array = $updateResponse->getResponse();
$facet_data = $response_array->facet_counts->facet_fields;
print_r($facet_data);
solr-2.8.1/examples/facet_002.php 0000664 0001750 0001750 00000001167 15001737315 015430 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query = new SolrQuery('*:*');
$query->setFacet(true);
$query->addFacetField('cat')->addFacetField('name')->setFacetMinCount(2);
$query->setFacetMinCount(4, 'name');
$updateResponse = $client->query($query);
$response_array = $updateResponse->getResponse();
$facet_data = $response_array->facet_counts->facet_fields;
print_r($facet_data);
solr-2.8.1/examples/solrclient_001_adddocument_01.php 0000664 0001750 0001750 00000001141 15001737315 021362 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$doc = new SolrInputDocument();
$doc->addField('id', 334455);
$doc->addField('cat', 'Software');
$doc->addField('cat', 'Lucene');
$updateResponse = $client->addDocument($doc);
print_r($updateResponse->getResponse());
/* you will have to commit changes to be written if you didn't use $commitWithin */
$client->commit();
solr-2.8.1/examples/solrclient_002_adddocument_02.php 0000664 0001750 0001750 00000001166 15001737315 021373 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$doc = new SolrInputDocument();
$doc->addField('id', 334455);
$doc->addField('cat', 'Software');
$doc->addField('cat', 'Lucene');
// No need to call commit() because $commitWithin is passed, so Solr Server will auto commit within 10 seconds
$updateResponse = $client->addDocument($doc, false, 10000);
print_r($updateResponse->getResponse());
solr-2.8.1/examples/solrclient_002_adddocument_03_child_docs.php 0000664 0001750 0001750 00000003120 15001737315 023537 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_STORE_PATH,
);
$client = new SolrClient($options);
$product = new SolrInputDocument();
$product->addField('id', 'black');
$product->addField('cat', 'tshirt');
$product->addField('cat', 'polo');
$product->addField('content_type', 'product');
$small = new SolrInputDocument();
$small->addField('id', 'TS-BLK-S');
$small->addField('content_type', 'sku');
$small->addField('size', 'S');
$small->addField('inventory', 100);
$medium = new SolrInputDocument();
$medium->addField('id', 'TS-BLK-M');
$medium->addField('content_type', 'sku');
$medium->addField('size', 'M');
$medium->addField('inventory', 200);
$large = new SolrInputDocument();
$large->addField('id', 'TS-BLK-L');
$large->addField('content_type', 'sku');
$large->addField('size', 'L');
$large->addField('inventory', 300);
// add child documents
$product->addChildDocument($small);
$product->addChildDocument($medium);
$product->addChildDocument($large);
// or
// $skus = [$small, $medium, $large];
// $product->addChildDocuments($skus);
// add product document to the index
$updateResponse = $client->addDocument(
$product,
true, // overwrite if the document exists
10000 // commit within 10 seconds
);
print_r($updateResponse->getResponse());
/* OUTPUT SIMILAR TO:
SolrObject Object
(
[responseHeader] => SolrObject Object
(
[status] => 0
[QTime] => 5
)
)
*/
solr-2.8.1/examples/solrclient_003_adddocuments_01.php 0000664 0001750 0001750 00000001317 15001737315 021554 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$doc = new SolrInputDocument();
$doc->addField('id', 334455);
$doc->addField('cat', 'Software');
$doc->addField('cat', 'Lucene');
$doc2 = clone $doc;
$doc2->deleteField('id');
$doc2->addField('id', 334456);
$docs = array($doc, $doc2);
$updateResponse = $client->addDocuments($docs);
/* you will have to commit changes to be written if you didn't use $commitWithin */
$client->commit();
print_r($updateResponse->getResponse());
solr-2.8.1/examples/solrclient_004_adddocuments_02.php 0000664 0001750 0001750 00000001162 15001737315 021554 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$doc = new SolrInputDocument();
$doc->addField('id', 334455);
$doc->addField('cat', 'Software');
$doc->addField('cat', 'Lucene');
$doc2 = clone $doc;
$doc2->deleteField('id');
$doc2->addField('id', 334456);
$docs = array($doc, $doc2);
$updateResponse = $client->addDocuments($docs, true, 1024);
print $updateResponse->getRawRequest();
solr-2.8.1/examples/solrclient_005_optimize.php 0000664 0001750 0001750 00000000631 15001737315 020442 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$update_response = $client->optimize(4, false, false);
$response = $update_response->getRawRequest();
print_r($response);
solr-2.8.1/examples/solrclient_006_commit.php 0000664 0001750 0001750 00000000632 15001737315 020074 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$update_response = $client->commit(true, false, false);
$response = $update_response->getRawRequest();
print_r($response);
solr-2.8.1/examples/solrclient_007_query.php 0000664 0001750 0001750 00000001104 15001737315 017745 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query = new SolrQuery();
$query->setQuery('lucene');
$query->setStart(0);
$query->setRows(50);
$query->addField('cat')->addField('features')->addField('id')->addField('timestamp');
$query_response = $client->query($query);
$response = $query_response->getResponse();
print_r($response);
solr-2.8.1/examples/solrclient_008_query_lucene.php 0000664 0001750 0001750 00000001146 15001737315 021307 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query = new SolrQuery();
$query->setQuery('manu:"Apple Computer Inc." OR text:apple');
$query->setStart(0);
$query->setRows(50);
$query->addField('cat')->addField('features')->addField('id')->addField('timestamp');
$query_response = $client->query($query);
$response = $query_response->getResponse();
print_r($response);
solr-2.8.1/examples/solrclient_009_query_parsemode.php 0000664 0001750 0001750 00000001207 15001737315 022012 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query = new SolrQuery();
$query->setQuery('lucene');
$query->setStart(0);
$query->setRows(50);
$query->addField('cat')->addField('features')->addField('id')->addField('timestamp');
$query_response = $client->query($query);
$query_response->setParseMode(SolrQueryResponse::PARSE_SOLR_DOC);
$response = $query_response->getResponse();
print_r($response);
solr-2.8.1/examples/solrdocument_001.php 0000664 0001750 0001750 00000000453 15001737315 017060 0 ustar biggi biggi addField('id', 1123);
$doc->features = "PHP Client Side";
$doc->features = "Fast development cycles";
$doc['cat'] = 'Software';
$doc['cat'] = 'Custom Search';
$doc->cat = 'Information Technology';
print_r($doc->toArray());
?>
solr-2.8.1/examples/solrdocument_002.php 0000664 0001750 0001750 00000000570 15001737315 017061 0 ustar biggi biggi addField('id', 1123);
$doc->features = "PHP Client Side";
$doc->features = "Fast development cycles";
$doc['cat'] = 'Software';
$doc['cat'] = 'Custom Search';
$doc->cat = 'Information Technology';
foreach ($doc as $fieldname => $fieldvalues)
{
print "$fieldname\n";
print_r($fieldvalues);
}
?>
solr-2.8.1/examples/solrdocument_003.php 0000664 0001750 0001750 00000000533 15001737315 017061 0 ustar biggi biggi addField('id', 1123);
$doc->features = "PHP Client Side";
$doc->features = "Fast development cycles";
$doc['cat'] = 'Software';
$doc['cat'] = 'Custom Search';
$doc->cat = 'Information Technology';
$input_doc = $doc->getInputDocument();
var_dump(get_class($input_doc));
?>
solr-2.8.1/examples/solrdocument_004.php 0000664 0001750 0001750 00000000647 15001737315 017070 0 ustar biggi biggi addField('id', 1123);
$doc->features = "PHP Client Side";
$doc->features = "Fast development cycles";
$doc['cat'] = 'Software';
$doc['cat'] = 'Custom Search';
$doc->cat = 'Information Technology';
$second_doc->addField('cat', 'Lucene Search');
$second_doc->merge($doc, true);
print_r($second_doc->toArray());
?>
solr-2.8.1/examples/solrobject_001.php 0000664 0001750 0001750 00000000261 15001737315 016505 0 ustar biggi biggi
solr-2.8.1/examples/solrobject_002.php 0000664 0001750 0001750 00000000342 15001737315 016506 0 ustar biggi biggi email = "iekpo@php.net";
} catch (Exception $e) {
var_dump($e->getCode());
var_dump($e->getMessage());
}
var_dump($solrObject->getPropertyNames());
?>
solr-2.8.1/examples/solrobject_003.php 0000664 0001750 0001750 00000000331 15001737315 016505 0 ustar biggi biggi system->threadDump->thread->stackTrace);
?>
solr-2.8.1/examples/solrobject_004.php 0000664 0001750 0001750 00000000412 15001737315 016506 0 ustar biggi biggi responseHeader);
$system = $solrObject->system;
print_r($header);
print_r($system);
?>
solr-2.8.1/examples/solrobject_005.php 0000664 0001750 0001750 00000000416 15001737315 016513 0 ustar biggi biggi
solr-2.8.1/examples/solrquery_001.php 0000664 0001750 0001750 00000000613 15001737315 016405 0 ustar biggi biggi setParam('a', 1);
$query->setParam('b', 2);
$query->setParam('c', 3);
$query->setStart(4)->setQuery('solr')->setTimeAllowed(500)->setRows(17);
$query->addField('israel')->addField('joshua')->addField('june');
$query->addSortField('cat', 0);
$query->addFilterQuery('solr')->addFilterQuery('solr1')->addFilterQuery('solr2');
echo $query;
echo "\n";
solr-2.8.1/examples/solrquery_002_facet.php 0000664 0001750 0001750 00000001136 15001737315 017551 0 ustar biggi biggi setFacet(0);
$query->addFacetField('israel')->addFacetField('israel2');
$query->addFacetQuery('silk')->addFacetQuery('name:june');
$query->setFacetPrefix('A')->setFacetPrefix('C', 'june');
$query->setFacetSort(1)->setFacetSort(0, 'june');
//
$query->setFacetLimit(98)->setFacetLimit(44, 'june');
$query->setFacetOffset(110)->setFacetOffset(12, 'june');
$query->setFacetMinCount(4)->setFacetMinCount(30, 'june');
$query->setFacetMissing(1)->setFacetMissing(0, 'june');
$query->setFacetMethod('enum')->setFacetMethod('fc', 'june');
echo $query;
echo "\n";
solr-2.8.1/examples/solrquery_003_date_facet.php 0000664 0001750 0001750 00000001407 15001737315 020550 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query = new SolrQuery('*:*');
$query->setFacet(true);
$query->addFacetDateField('manufacturedate_dt');
$query->setFacetDateStart('2006-02-13T00:00:00Z');
$query->setFacetDateEnd('2012-02-13T00:00:00Z');
$query->setFacetDateGap('+1YEAR');
$query->setFacetDateHardEnd(1);
$query->addFacetDateOther('before');
$updateResponse = $client->query($query);
$response_array = $updateResponse->getResponse();
$facet_data = $response_array->facet_counts->facet_dates;
print_r($facet_data);
solr-2.8.1/examples/solrquery_004_highlight.php 0000644 0001750 0001750 00000003143 15001737315 020436 0 ustar biggi biggi setHighlight(true);
$query->setHighlightQuery('title:PHP OR description:Solr');
$query->addHighlightField('a')->addHighlightField('a')->addHighlightField('a');
$query->removeHighlightField('a')->removeHighlightField('a')->removeHighlightField('a');
$query->setHighlightSnippets(4)->setHighlightSnippets(5, 'june');
$query->setHighlightFragsize(41)->setHighlightFragsize(52, 'june');
$query->setHighlightMergeContiguous(true)->setHighlightMergeContiguous(false, 'june');
$query->setHighlightRequireFieldMatch(true);
$query->setHighlightMaxAnalyzedChars(44)->setHighlightMaxAnalyzedChars(53);
$query->setHighlightAlternateField('pizza')->setHighlightAlternateField('bread', 'june');
$query->setHighlightAlternateField('blue')->setHighlightAlternateField('red','june');
$query->setHighlightAlternateField('a')->setHighlightAlternateField('b','june');
$query->setHighlightMaxAlternateFieldLength(300)->setHighlightMaxAlternateFieldLength(335, 'june');
$query->setHighlightFormatter('F')->setHighlightFormatter('G', 'june');
$query->setHighlightSimplePre('OO')->setHighlightSimplePre('PP', 'june');
$query->setHighlightSimplePost('ZZ')->setHighlightSimplePost('YY', 'june');
$query->setHighlightFragmenter('gap')->setHighlightFragmenter('space', 'june');
$query->setHighlightUsePhraseHighlighter(false);
$query->setHighlightHighlightMultiTerm(1);
$query->setHighlightRegexSlop(0.0025);
$query->setHighlightRegexPattern("israel")->setHighlightRegexPattern("ekpo");
$query->setHighlightRegexMaxAnalyzedChars(444)->setHighlightRegexMaxAnalyzedChars(5.0);
echo $query;
echo "\n";
solr-2.8.1/examples/solrquery_005_stats.php 0000664 0001750 0001750 00000000366 15001737315 017634 0 ustar biggi biggi setStats(0);
$query->addStatsField('hello')->addStatsField('june')->removeStatsField('hello');
$query->addStatsFacet('world')->addStatsFacet('pear')->removeStatsFacet('world');
echo $query;
echo "\n";
solr-2.8.1/examples/solrquery_006_mlt.php 0000664 0001750 0001750 00000001021 15001737315 017260 0 ustar biggi biggi setMlt(1);
$query->setMltCount(55)->setMltCount(90);
$query->addMltField('june')->addMltField('joshua')->addMltField('mom')->removeMltField('joshua');
$query->addMltQueryField('june', 0.0)->addMltQueryField('israel', 9.558);
$query->setMltMinTermFrequency(9);
$query->setMltMinDocFrequency(5);
$query->setMltMinWordLength(8);
$query->setMltMaxWordLength(99);
$query->setMltMaxNumTokens(6);
$query->setMltMaxNumQueryTerms(2);
$query->setMltBoost(true);
echo $query;
echo "\n";
solr-2.8.1/examples/solrquery_007_terms.php 0000664 0001750 0001750 00000000711 15001737315 017624 0 ustar biggi biggi setTerms(true);
$query->setTermsField('israel');
$query->setTermsLowerBound('june');
$query->setTermsUpperBound('joshua');
$query->setTermsIncludeLowerBound(false);
$query->setTermsIncludeUpperBound(0);
$query->setTermsMinCount(50);
$query->setTermsMaxCount(200);
$query->setTermsPrefix('A');
$query->setTermsLimit(45);
$query->setTermsReturnRaw(false);
$query->setTermsSort(0);
echo $query;
echo "\n";
solr-2.8.1/examples/solrutils_001_digestxmlresponse.php 0000664 0001750 0001750 00000000331 15001737315 022234 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
);
$client = new SolrClient($options);
$query = new SolrQuery();
$userInput = 'USB/2';
$escapedUserInput = SolrUtils::escapeQueryChars($userInput);
$query->setQuery('text:'.$escapedUserInput);
echo $query.PHP_EOL;
solr-2.8.1/examples/terms_001.php 0000664 0001750 0001750 00000000703 15001737315 015472 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query = new SolrQuery();
$query->setTerms(true);
$query->setTermsField('cat');
$updateResponse = $client->query($query);
print_r($updateResponse->getResponse());
solr-2.8.1/examples/terms_002.php 0000664 0001750 0001750 00000001032 15001737315 015467 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query = new SolrQuery();
$query->setTerms(true);
/* Return only terms starting with $prefix */
$prefix = 'c';
$query->setTermsField('cat')->setTermsPrefix($prefix);
$updateResponse = $client->query($query);
print_r($updateResponse->getResponse());
solr-2.8.1/examples/terms_003.php 0000664 0001750 0001750 00000001212 15001737315 015470 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query = new SolrQuery();
$query->setTerms(true);
/* Return only terms starting with $prefix */
$prefix = 'c';
/* Return only terms with a frequency of 2 or greater */
$min_frequency = 2;
$query->setTermsField('cat')->setTermsPrefix($prefix)->setTermsMinCount($min_frequency);
$updateResponse = $client->query($query);
print_r($updateResponse->getResponse());
solr-2.8.1/examples/test.config.php 0000664 0001750 0001750 00000003321 15001737315 016202 0 ustar biggi biggi
solr-2.8.1/examples/solrdismaxquery_001.php 0000664 0001750 0001750 00000001745 15001737315 017622 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$disMaxQuery = new SolrDisMaxQuery();
$disMaxQuery->setStart(0)->setQuery('solr')->setTimeAllowed(500)->setRows(17);
$disMaxQuery->addSortField('price', 0);
$disMaxQuery
->setQueryAlt('*:*')->addQueryField('text', 1.5)
->addQueryField('title', 5)
->addBoostQuery('cat', 'electronics', 2)
->setQueryPhraseSlop(1)
->setBigramPhraseSlop(3)
->addBigramPhraseField('text', 2.5)
->addBigramPhraseField('type', 3, 4)
->setTrigramPhraseFields('content^0.5 anchor~4^1.5 title^1.2 site^1.5')
;
$queryResponse = $client->query($disMaxQuery);
$response = $queryResponse->getResponse();
if($response->response->numFound > 0) {
$docs = $response->response->docs;
print_r($docs);
} else {
echo "No Documents Found".PHP_EOL;
}
solr-2.8.1/examples/solrclient_010_getbyid.php 0000664 0001750 0001750 00000000547 15001737315 020233 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH
);
$client = new SolrClient($options);
$response = $client->getById('GB18030TEST');
print_r($response->getResponse());
solr-2.8.1/examples/solrclient_011_getbyids.php 0000664 0001750 0001750 00000000566 15001737315 020420 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH
);
$client = new SolrClient($options);
$response = $client->getByIds(['GB18030TEST', '6H500F0']);
print_r($response->getResponse());
solr-2.8.1/examples/solrclient_012_system.php 0000664 0001750 0001750 00000000604 15001737315 020124 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query_response = $client->system();
$response = $query_response->getResponse();
print_r($response);
solr-2.8.1/examples/solrquery_008_facetquery.php 0000664 0001750 0001750 00000001055 15001737315 020645 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$client = new SolrClient($options);
$query = new SolrQuery('*:*');
$query->setFacet(true);
$query->addFacetQuery('price:[* TO 500]')->addFacetQuery('price:[500 TO *]');
$query_response = $client->query($query);
$response = $query_response->getResponse();
print_r($response->facet_counts->facet_queries);
solr-2.8.1/examples/solrquery_009_grouping.php 0000664 0001750 0001750 00000001155 15001737315 020331 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH
);
$client = new SolrClient($options);
$query = new SolrDismaxQuery('*:*');
$query->setRows(4);
$query->setGroup(true);
$query->addGroupField('manu_s_id');
$query->setGroupLimit(2);
$query->addGroupSortField('price', SolrQuery::ORDER_ASC);
$query->setGroupNGroups(true);
$query_response = $client->query($query);
$response = $query_response->getResponse();
print_r($response);
solr-2.8.1/examples/solrquery_010_collapse.php 0000664 0001750 0001750 00000001236 15001737315 020271 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH
);
$client = new SolrClient($options);
$query = new SolrQuery('*:*');
$collapseFunction = new SolrCollapseFunction('manu_id_s');
$collapseFunction
->setSize(2)
->setNullPolicy(SolrCollapseFunction::NULLPOLICY_IGNORE);
// $collapseFunction->setMax('sum(cscore(),field(A))');
$query
->collapse($collapseFunction)
->setRows(4);
$queryResponse = $client->query($query);
$response = $queryResponse->getResponse();
print_r($response);
solr-2.8.1/examples/solrquery_011_expand.php 0000664 0001750 0001750 00000001261 15001737315 017745 0 ustar biggi biggi SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH
);
$client = new SolrClient($options);
$query = new SolrQuery('*:*');
$func = new SolrCollapseFunction('manu_id_s');
$query->collapse($func);
$query->setExpand(true);
$query->setExpandRows(10);
$query->setExpandQuery('manu_id_s:corsair');
$query->addExpandFilterQuery('inStock:true');
$query->addExpandSortField('score', SolrQuery::ORDER_DESC);
$queryResponse = $client->query($query);
$response = $queryResponse->getResponse();
print_r($response);
solr-2.8.1/examples/update_stream_file.php 0000664 0001750 0001750 00000002016 15001737315 017613 0 ustar biggi biggi set(SolrExtractRequest::LITERALS_PREFIX . 'id', 'doc1')
// capture what is inside paragraph tags
->set(SolrExtractRequest::CAPTURE_ELEMENTS, 'p')
// Indexes attributes of the Tika XHTML elements into separate fields
->set(SolrExtractRequest::CAPTURE_ATTRIBUTES, 'true')
// map p content to solr field
->set(
SolrExtractRequest::FIELD_MAPPING_PREFIX . 'p',
'an_indexed_field_name_that_holds_paragraphs'
)
// capture unmapped content here
->set(SolrExtractRequest::DEFAULT_FIELD, '__text__')
// restrict capturing to matching xpath expression
->set(
SolrExtractRequest::XPATH_EXPRESSION,
'/xhtml:html/xhtml:body/xhtml:div//node()'
)
;
// please reference docs/documentation.php for the rest of the parameters
$extractRequest = SolrExtractRequest::createFromFile('path/to/file.html', $extractParams);
$response = $client->sendUpdateStream($extractRequest);
solr-2.8.1/examples/update_stream_payload.php 0000664 0001750 0001750 00000002114 15001737315 020324 0 ustar biggi biggi set(SolrExtractRequest::LITERALS_PREFIX . 'id', 'doc1')
// capture what is inside paragraph tags
->set(SolrExtractRequest::CAPTURE_ELEMENTS, 'p')
// Indexes attributes of the Tika XHTML elements into separate fields
->set(SolrExtractRequest::CAPTURE_ATTRIBUTES, 'true')
// map p content to solr field
->set(
SolrExtractRequest::FIELD_MAPPING_PREFIX . 'p',
'an_indexed_field_name_that_holds_paragraphs'
)
// capture unmapped content here
->set(SolrExtractRequest::DEFAULT_FIELD, '__text__')
// restrict capturing to matching xpath expression
->set(
SolrExtractRequest::XPATH_EXPRESSION,
'/xhtml:html/xhtml:body/xhtml:div//node()'
)
;
$binContent = file_get_contents('somefile.pdf');
// please reference docs/documentation.php for the rest of the parameters
$extractRequest = SolrExtractRequest::createFromStream($binContent, 'application/pdf', $extractParams);
$response = $client->sendUpdateStream($extractRequest);
solr-2.8.1/examples/solrinputdocument_update_partial.php 0000664 0001750 0001750 00000001116 15001737315 022633 0 ustar biggi biggi addField('id', 'my_long_doc_id');
$doc->updateField('field1', SolrInputDocument::UPDATE_MODIFIER_ADD, 'newly added value');
$doc->updateField('field1', SolrInputDocument::UPDATE_MODIFIER_REMOVE, 'remove me please');
$doc->updateField('field3_i', SolrInputDocument::UPDATE_MODIFIER_INC, 5);
$doc->updateField('field2_s', SolrInputDocument::UPDATE_MODIFIER_SET, 'updated string');
$doc->updateField('field1', SolrInputDocument::UPDATE_MODIFIER_REMOVEREGEX, '[\d]{2}/[\d]{2}/[\d]{4}');
$response = $client->addDocument($doc);
$client->commit(); solr-2.8.1/tests/files/bug67394.json 0000664 0001750 0001750 00000001435 15001737315 015765 0 ustar biggi biggi {
"responseHeader": {
"status": 0,
"QTime": 5,
"params": {
"fl": "date",
"indent": "true",
"start": "0",
"stats": "true",
"stats.field": "date",
"q": "bahruz",
"_": "1402067668264",
"wt": "json",
"rows": "1"
}
},
"response": {
"numFound": 1039,
"start": 0,
"docs": [
{
"date": "2012-10-10T15:05:18Z"
}
]
},
"stats": {
"stats_fields": {
"date": {
"min": "2011-10-20T11:16:34Z",
"max": "2014-06-04T13:41:45Z",
"count": 1039,
"missing": 0,
"sum": "47085-11-30T17:59:27.999Z",
"mean": "2013-06-03T17:17:43.684Z",
"sumOfSquares": -234260129500201700000,
"stddev": "NaN",
"facets": {}
}
}
}
}
solr-2.8.1/tests/files/bug67394.xml 0000664 0001750 0001750 00000001202 15001737315 015604 0 ustar biggi biggi
0
72
0
0
0.0
0.0
NaN
0.0