Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Annotation/Inherit.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class Inherit
* Constructor.
*
* @param array $values
*
*
* @throws \InvalidArgumentException
*/
public function __constructor(array $values)
Expand Down
2 changes: 2 additions & 0 deletions Annotation/MultiField.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace ONGR\ElasticsearchBundle\Annotation;

use Doctrine\Common\Annotations\Annotation\Required;

/**
* Annotation that can be used to define multi-field parameters.
*
Expand Down
10 changes: 4 additions & 6 deletions Annotation/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace ONGR\ElasticsearchBundle\Annotation;

use Doctrine\Common\Annotations\Annotation\Required;

/**
* Annotation used to check mapping type during the parsing process.
*
Expand Down Expand Up @@ -74,16 +76,12 @@ final class Property
public $fielddata;

/**
* Object name to map.
*
* @var string
* @var string Object name to map.
*/
public $objectName;

/**
* OneToOne or OneToMany.
*
* @var bool
* @var bool OneToOne or OneToMany.
*/
public $multiple;

Expand Down
4 changes: 2 additions & 2 deletions Annotation/Skip.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ final class Skip

/**
* Constructor.
*
*
* @param array $values
*
*
* @throws \InvalidArgumentException
*/
public function __constructor(array $values)
Expand Down
2 changes: 2 additions & 0 deletions Annotation/Suggester/AbstractSuggesterProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace ONGR\ElasticsearchBundle\Annotation\Suggester;

use Doctrine\Common\Annotations\Annotation\Required;

/**
* Abstract class for various suggester annotations.
*/
Expand Down
2 changes: 2 additions & 0 deletions Annotation/Suggester/Context/AbstractContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace ONGR\ElasticsearchBundle\Annotation\Suggester\Context;

use Doctrine\Common\Annotations\Annotation\Required;

/**
* Abstract class for various context annotations.
*/
Expand Down
6 changes: 3 additions & 3 deletions Cache/WarmerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ interface WarmerInterface
{
/**
* Warms up search using warmers api.
*
*
* @param Search $search
*
*
* @link http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-warmers.html
*/
public function warmUp(Search $search);

/**
* Returns warmer name.
*
*
* @return string
*/
public function getName();
Expand Down
4 changes: 2 additions & 2 deletions Cache/WarmersContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class WarmersContainer

/**
* Warms up the cache.
*
*
* @return array
*/
public function getWarmers()
Expand Down Expand Up @@ -54,7 +54,7 @@ public function setWarmers(array $warmers)

/**
* Adds cache warmer.
*
*
* @param WarmerInterface $warmer
*/
public function addWarmer(WarmerInterface $warmer)
Expand Down
4 changes: 2 additions & 2 deletions Client/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function scroll($scrollId, $scrollDuration)

/**
* Creates fresh elasticsearch index.
*
*
* @param bool $putWarmers Determines if warmers should be loaded.
*/
public function createIndex($putWarmers = false)
Expand All @@ -240,7 +240,7 @@ public function dropIndex()

/**
* Tries to drop and create fresh elasticsearch index.
*
*
* @param bool $putWarmers Determines if warmers should be loaded.
*/
public function dropAndCreateIndex($putWarmers = false)
Expand Down
12 changes: 3 additions & 9 deletions DSL/Aggregation/TopHitsAggregation.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,17 @@ class TopHitsAggregation extends AbstractAggregation
use MetricTrait;

/**
* Number of top matching hits to return per bucket.
*
* @var int
* @var int Number of top matching hits to return per bucket.
*/
private $size;

/**
* The offset from the first result you want to fetch.
*
* @var int
* @var int The offset from the first result you want to fetch.
*/
private $from;

/**
* How the top matching hits should be sorted.
*
* @var Sorts
* @var Sorts How the top matching hits should be sorted.
*/
private $sort;

Expand Down
4 changes: 2 additions & 2 deletions DSL/Filter/AbstractFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ abstract class AbstractFilter
protected $filters;

/**
* @param array $boolParams Bool parameters.
* Initializes bool filter.
*
* @internal param bool $filters Filters collection.
* @param array $boolParams Bool parameters.
*/
public function __construct($boolParams = [])
{
Expand Down
4 changes: 2 additions & 2 deletions DSL/Filter/IndicesFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
class IndicesFilter implements BuilderInterface
{
/**
* @var string[] $indices
* @var string[]
*/
private $indices;

/**
* @var BuilderInterface $filter
* @var BuilderInterface
*/
private $filter;

Expand Down
36 changes: 11 additions & 25 deletions DSL/Highlight/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,63 +23,49 @@ class Field
const TYPE_FVH = 'fvh';

/**
* Field name.
*
* @var string
* @var string Field name.
*/
protected $name;

/**
* Highlighter type. By default 'plain'.
*
* @var string
* @var string Highlighter type. By default 'plain'.
*/
protected $type;

/**
* Size of the highlighted fragment in characters. By default 100.
*
* @var int
* @var int Size of the highlighted fragment in characters. By default 100.
*/
protected $fragmentSize;

/**
* Maximum number of fragments to return. By default 5.
*
* @var int
* @var int Maximum number of fragments to return. By default 5.
*/
protected $numberOfFragments;

/**
* Combine matches on multiple fields to highlight a single field.
*
* @var array
* @var array Combine matches on multiple fields to highlight a single field.
*/
protected $matchedFields;

/**
* Query to highlight.
*
* @var BuilderInterface
* @var BuilderInterface Query to highlight.
*/
protected $highlightQuery;

/**
* Show part of string even if there are no matches to highlight. Defaults to 0.
*
* @var int
* @var int Show part of string even if there are no matches to highlight. Defaults to 0.
*/
protected $noMatchSize;

/**
* Highlight fields based on the source.
*
* @var bool
* @var bool Highlight fields based on the source.
*/
protected $forceSource;

/**
* @param string $name
* Creates a highlight for a field.
*
* @param string $name Field name.
*/
public function __construct($name)
{
Expand Down
28 changes: 7 additions & 21 deletions DSL/Highlight/Highlight.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,51 +21,37 @@ class Highlight
const TYPE_FVH = 'fvh';

/**
* Holds fields to highlight.
*
* @var array
* @var array Holds fields to highlight.
*/
protected $fields = [];

/**
* Holds html tag name and class that highlight will be put in (default 'em' tag).
*
* @var array
* @var array Holds html tag name and class that highlight will be put in (default 'em' tag).
*/
protected $tags = [];

/**
* Holds tag schema name. 'styled' is the only option yet.
*
* @var string
* @var string Holds tag schema name. 'styled' is the only option yet.
*/
protected $tagsSchema = null;

/**
* Fragments sort type.
*
* @var string
* @var string Fragments sort type.
*/
protected $order = null;

/**
* Highlighter type. By default plain.
*
* @var string
* @var string Highlighter type. By default plain.
*/
protected $type = null;

/**
* Size of the highlighted fragment in characters. By default 100.
*
* @var int
* @var int Size of the highlighted fragment in characters. By default 100.
*/
protected $fragmentSize = null;

/**
* Maximum number of fragments to return. By default 5.
*
* @var int
* @var int Maximum number of fragments to return. By default 5.
*/
protected $numberOfFragments = null;

Expand Down
2 changes: 1 addition & 1 deletion DSL/Query/FilteredQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class FilteredQuery extends AbstractFilter implements BuilderInterface
{
/**
* @var Query used inside filtered area.
* @var Query Used inside filtered area.
*/
private $query;

Expand Down
4 changes: 2 additions & 2 deletions DSL/Query/IndicesQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
class IndicesQuery implements BuilderInterface
{
/**
* @var string[] $indices
* @var string[]
*/
private $indices;

/**
* @var BuilderInterface $query
* @var BuilderInterface
*/
private $query;

Expand Down
2 changes: 1 addition & 1 deletion DSL/Query/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class Query implements BuilderInterface
{
/**
* @var BuilderInterface[] Queries
* @var BuilderInterface[]
*/
private $queries;

Expand Down
4 changes: 1 addition & 3 deletions DSL/Query/RangeQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ class RangeQuery implements BuilderInterface
const GTE = 'gte';

/**
* Field name.
*
* @var string
* @var string Field name.
*/
private $field;

Expand Down
8 changes: 3 additions & 5 deletions DSL/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Search
const SCROLL_DURATION = '5m';

/**
* @var Query $query
* @var Query
*/
private $query;

Expand All @@ -41,14 +41,12 @@ class Search
private $boolQueryParams;

/**
* @var BuilderInterface $filters
* @var BuilderInterface
*/
private $filters;

/**
* Filters collection.
*
* @var BuilderInterface $postFilters
* @var BuilderInterface Filters collection.
*/
private $postFilters;

Expand Down
Loading