Skip to content

Repository files navigation

SolrQueryComponent

Test

Build Solr queries with ease

SolrQueryComponent helps building Solr/Lucene/ElasticSearch queries with a query builder API. It is independent of the concrete client library and can be used with e.g. PECL Solr or Solarium.

Examples

Build name:"John Doe"^100

<?phpuseInterNations\Component\Solr\Expression\ExpressionBuilder;
$eb = newExpressionBuilder();
echo$eb->field('name', $eb->boost($eb->eq('John Doe'), 100));

And the same with the query string object:

<?phpuseInterNations\Component\Solr\Query\QueryString;
echo (newQueryString('name:<name>^<boost>'))
->setPlaceholder('name', 'John Doe')
->setPlaceholder('boost', 100);

Learn more on how to use the component in docs/.

About

Build Solr queries with ease

Resources

Stars

63 stars

Watchers

37 watching

Forks

Releases

Packages

Used by

Contributors

Languages