Copyright 2011 Bas de Nooijer. More...
Copyright 2011 Bas de Nooijer.
Version indicator.
Query result.
Terms query result.
Suggester query result.
Suggester query term result.
Select query result.
Select component stats result.
Select component stats field result item.
Select component stats facet value.
Select component spellcheck result.
Select component spellcheck suggestion result.
Select component spellcheck collation result.
Select component morelikethis result.
Select component morelikethis result item.
Select component highlighting result.
Select component highlighting result item.
Select component grouping result.
Select component grouping field value group result.
Select component grouping query group result.
Select component grouping field group result.
Select component facetset result.
Select range facet result.
Select query facet result.
Select multiquery facet result.
Select field facet result.
Select component debug result.
Select component debug timing phase result.
Select component debug timing result.
Select component debug documentset result.
Select component debug document result.
Select component debug detail result.
QueryType result.
Ping query result.
MoreLikeThis query result.
Analysis types result.
Analysis list result.
Analysis item.
Analysis field query result.
Analysis document query result.
Base class for all query types, not intended for direct usage.
Update query.
Update query command base class.
Update query rollback command.
Update query optimize command.
Update query delete command.
Update query commit command.
Update query add command.
Terms query.
Suggester Query.
Select Query.
Filterquery.
Query component base class.
Stats component.
Stats component field class.
Spellcheck component.
Highlighting component.
Highlighting per-field settings.
Grouping component.
MoreLikeThis component.
Facet base class.
Facet range.
Facet MultiQuery.
Facet query.
Distributed Search (sharding) component.
DisMax component.
Debug component.
Ping query.
MoreLikeThis Query.
Query helper.
Base class for Analysis queries.
Analysis document query.
Prefetch plugin.
PostBigRequest plugin.
ParallelExecution plugin.
Loadbalancer plugin.
Weighted random choice class.
CustomizeRequest plugin.
Customization value object.
Buffered add plugin.
Base class for plugins.
Solarium specific exception.
Read/Write Solr document.
Read-only Solr document.
Base class for configurable classes.
Main interface for interaction with Solr.
Base class for handling Solr response data.
Parse update response data.
Parse Suggester response data.
Parse select response data.
Parse select component Stats result from the data.
Parse select component MoreLikeThis result from the data.
Parse select component Highlighting result from the data.
Parse select component Grouping result from the data.
Parse select component FacetSet result from the data.
Parse select component Debug result from the data.
Parse MoreLikeThis response data.
Parse document analysis response data.
Class for describing a response.
Class for building Solarium client requests.
Build an update request.
Build a Terms query request.
Build a Suggester query request.
Build a select request.
Add select component stats to the request.
Add select component Spellcheck to the request.
Add select component morelikethis to the request.
Add select component Highlighting to the request.
Add select component Grouping to the request.
Add select component FacetSet to the request.
Add select component distributedsearch to the request.
Add select component dismax to the request.
Add select component debug to the request.
Build a ping request.
Build a MoreLikeThis request.
Build an analysis request.
Build a field analysis request.
Build a document analysis request.
Class for describing a request.
Solarium client HTTP exception.
Base class for all adapters.
Adapter that uses a Zend_Http_Client.
Pecl HTTP adapter.
Copyright 2011 Gasol Wu.
Basic HTTP adapter using a stream.
cURL HTTP adapter
Autoloader.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this listof conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the copyright holder.
$client = new Solarium_Client; $query = $client->createSelect(); $result = $client->select($query);
Client All classes extending this class are configurable using the constructor or setOption calls. This is the base for many Solarium classes, providing a uniform interface for various models. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this listof conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the copyright holder. Copyright 2011 Bas de Nooijer <solarium@raspberry.nl> http://github.com/basdenooijer/solarium/raw/master/COPYING http://www.solarium-project.org/ Document This is the default Solr document type returned by a select query. You can access the fields as object properties or iterate over all fields. Document This document type is used for update queries. It has all of the features of the readonly document and it also allows for updating or adding fields and boosts. While it is possible to use this document type for a select, alter it and use it in an update query (effectively the 'edit' that Solr doesn't have) this is not recommended. Most Solr indexes have fields that are indexed and not stored. You will loose that data because it is impossible to retrieve it from Solr. Always update from the original data source. Document All exceptions thrown by Solarium are of this type. This way you can easily catch Solarium exceptions and keep them separate from your own exceptions. Plugin If you need to add (or update) a big number of documents to Solr it's much more efficient to do so in batches. This plugin makes this as easy as possible. Plugin You can use this plugin to customize the requests generated for Solarium queries by adding or overwriting params and/or headers. Plugin For use in the loadbalancer plugin Plugin Using this plugin you can use software loadbalancing over multiple Solr instances. You can add any number of servers, each with their own weight. The weight influences the probability of a server being used for a query. By default all queries except updates are loadbalanced. This can be customized by setting blocked querytypes. Any querytype that may not be loadbalanced will be executed by Solarium with the default adapter settings. In a master-slave setup the default adapter should be connecting to the master server. You can also enable the failover mode. In this case a query will be retried on another server in case of error. Plugin You can use this plugin to run multiple queries parallel. This functionality depends on the curl adapter so you do need to have curl available in your PHP environment. While query execution is parallel, the results only become available as soon as all requests have finished. So the time of the slowest query will be the effective execution time for all queries. Plugin If you reach the url/header length limit of your servlet container your queries will fail. You can increase the limit in the servlet container, but if that's not possible this plugin can automatically convert big GET requests into POST requests. A POST request (usually) has a much higher limit. The default maximum querystring length is 1024. This doesn't include the base url or headers. For most servlet setups this limit leaves enough room for that extra data. Adjust the limit if needed. Plugin This plugin can be used to create an 'endless' iterator over a complete resultset. The iterator will take care of fetching the data in sets (sequential prefetching). Plugin All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this listof conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the copyright holder. Copyright 2011 Bas de Nooijer <solarium@raspberry.nl> http://github.com/basdenooijer/solarium/raw/master/COPYING http://www.solarium-project.org/ Query Query Generates small snippets for use in queries, filterqueries and sorting Query Copyright 2011 Gasol Wu. PIXNET Digital Media Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this listof conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the copyright holder. Copyright 2011 Bas de Nooijer <solarium@raspberry.nl> Copyright 2011 Gasol Wu <gasol.wu@gmail.com> http://github.com/basdenooijer/solarium/raw/master/COPYING http://www.solarium-project.org/ Query Can be used to select documents and/or facets from Solr. This querytype has lots of options and there are many Solarium subclasses for it. See the Solr documentation and the relevant Solarium classes for more info. Query Use a ping query to test Solr communication. A ping query has only two options, the path to use and the resultclass. See Solarium_Query} for the methods to set these options. Query http://wiki.apache.org/solr/CommonQueryParameters#Debugging Query http://wiki.apache.org/solr/DisMaxQParserPlugin Query http://wiki.apache.org/solr/DistributedSearch Query http://wiki.apache.org/solr/SimpleFacetParameters#Field_Value_Faceting_Parameters Query This is a 'virtual' querytype that combines multiple facet queries into a single resultset Query http://wiki.apache.org/solr/SimpleFacetParameters#facet.query_:_Arbitrary_Query_Faceting Query http://wiki.apache.org/solr/SimpleFacetParameters#Facet_by_Range Query http://wiki.apache.org/solr/SimpleFacetParameters Query http://wiki.apache.org/solr/MoreLikeThis Query Also known as Result Grouping or Field Collapsing. See the Solr wiki for more info about this functionality http://wiki.apache.org/solr/FieldCollapsing 2.1.0 Query http://wiki.apache.org/solr/HighlightingParameters Query http://wiki.apache.org/solr/SpellCheckComponent Query All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this listof conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the copyright holder. Copyright 2011 Bas de Nooijer <solarium@raspberry.nl> http://github.com/basdenooijer/solarium/raw/master/COPYING http://www.solarium-project.org/ Query TODO Voorbeeld request: http://localhost:8983/solr/select?q=*:*&stats=true&stats.field=price&stats.field=popularity &stats.twopass=true&rows=0&indent=true&stats.facet=inStock&f.price.stats.facet=price &f.price.stats.facet=popularity http://wiki.apache.org/solr/StatsComponent Query http://wiki.apache.org/solr/CommonQueryParameters#fq Query Can be used for an autocomplete feature. See http://wiki.apache.org/solr/Suggester for more info. Query A terms query provides access to the indexed terms in a field and the number of documents that match each term. This can be useful for doing auto-suggest or other things that operate at the term level instead of the search or document level. Retrieving terms in index order is very fast since the implementation directly uses Lucene's TermEnum to iterate over the term dictionary. Query For details about the Solr options see: http://wiki.apache.org/solr/UpdateXmlMessages#add.2BAC8-update Query For details about the Solr options see: http://wiki.apache.org/solr/UpdateXmlMessages#A.22commit.22_and_.22optimize.22 Query For details about the Solr options see: http://wiki.apache.org/solr/UpdateXmlMessages#A.22delete.22_by_ID_and_by_Query Query For details see: http://wiki.apache.org/solr/UpdateXmlMessages#A.22rollback.22 Query Can be used to send multiple update commands to solr, e.g. add, delete, rollback, commit, optimize. Multiple commands of any type can be combined into a single update query. Query All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this listof conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the copyright holder. Copyright 2011 Bas de Nooijer <solarium@raspberry.nl> http://github.com/basdenooijer/solarium/raw/master/COPYING http://www.solarium-project.org/ Result Result PIXNET Digital Media Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this listof conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the copyright holder. Copyright 2011 Gasol Wu <gasol.wu@gmail.com> http://github.com/basdenooijer/solarium/raw/master/COPYING http://www.solarium-project.org/ Result This is the standard resulttype for a moreLikeThis query. Example usage: // total solr mlt results $result->getNumFound(); // results fetched count($result); // iterate over fetched mlt docs foreach ($result AS $doc) { .... }
Result A ping query has no useful result so only a dummy status var is available. If you don't get an exception for a ping query it was succesful. Result A field facet will usually return a dataset of multiple rows, in each row a value and it's count. You can access the values as an array using getValues()} or iterate this object. Result A multiquery facet will usually return a dataset of multiple rows, in each row a query key and it's count. You can access the values as an array using getValues()} or iterate this object. Result Since a query facet has only a single result, the count for the query, this is a very simple object. Result A multiquery facet will usually return a dataset of multiple count, in each row a range as key and it's count. You can access the values as an array using getValues()} or iterate this object. The extra counts 'before', 'between' and 'after' are only available if the right settings for the option 'other' were used in the query. Result 2.1.0 Result This is the standard resulttype for a select query. Example usage: // total solr results $result->getNumFound(); // results fetched count($result); // get a single facet by key $result->getFacet('category'); // iterate over fetched docs foreach ($result AS $doc) { .... }
Result This base class provides access to the response and decoded data. If you need more functionality like resultset parsing use one of the subclasses Result This class can be used to check the library version within your code. This can be important if you rely on a minimal version for the features you use.