Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Latest commit

 

History

History
34 lines (24 loc) · 1.71 KB

README.md

File metadata and controls

34 lines (24 loc) · 1.71 KB

SolrQueryComponent

Gitter Build Status Dependency Status Average time to resolve an issue Percentage of issues still open

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

<?php
use InterNations\Component\Solr\Expression\ExpressionBuilder;

$eb = new ExpressionBuilder();
echo $eb->field('name', $eb->boost($eb->eq('John Doe'), 100));

And the same with the query string object:

<?php
use InterNations\Component\Solr\Query\QueryString;

echo (new QueryString('name:<name>^<boost>'))
    ->setPlaceholder('name', 'John Doe')
    ->setPlaceholder('boost', 100);

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