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
6 changes: 6 additions & 0 deletions src/Mapping/Analyzer/AbstractDictionary.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ public function tokenizer(): string
}


public function getStopFilter(): ?\Spameri\ElasticQuery\Mapping\Filter\AbstractStop
{
return $this->stopFilter;
}


public function toArray(): array
{
$filterArray = [];
Expand Down
5 changes: 4 additions & 1 deletion src/Mapping/Filter/AbstractStop.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ public function getType(): string
}


abstract public function getStopWords(): array;
public function getStopWords(): array
{
return $this->extraWords;
}


abstract public function getName(): string;
Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Arabic.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Arabic extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::ARABIC,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::ARABIC;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Armenian.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Armenian extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::ARMENIAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::ARMENIAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Basque.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Basque extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::BASQUE,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::BASQUE;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Bengali.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Bengali extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::BENGALI,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::BENGALI;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Brazilian.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Brazilian extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::BRAZILIAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::BRAZILIAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Bulgarian.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Bulgarian extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::BULGARIAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::BULGARIAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Catalan.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Catalan extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::CATALAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::CATALAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Czech.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Czech extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::CZECH,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::CZECH;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Danish.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Danish extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::DANISH,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::DANISH;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Dutch.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Dutch extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::DUTCH,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::DUTCH;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/English.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class English extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::ENGLISH,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::ENGLISH;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Finnish.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Finnish extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::FINNISH,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::FINNISH;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/French.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class French extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::FRENCH,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::FRENCH;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Galician.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Galician extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::GALICIAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::GALICIAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/German.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class German extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::GERMAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::GERMAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Greek.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Greek extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::GREEK,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::GREEK;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Hindi.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Hindi extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::HINDI,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::HINDI;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Hungarian.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Hungarian extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::HUNGARIAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::HUNGARIAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Indonesian.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Indonesian extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::INDONESIAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::INDONESIAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Irish.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Irish extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::IRISH,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::IRISH;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Italian.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Italian extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::ITALIAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::ITALIAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Latvian.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Latvian extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::LATVIAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::LATVIAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/None.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ class None extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::NONE,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::NONE;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Norwegian.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Norwegian extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::NORWEGIAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::NORWEGIAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Persian.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Persian extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::PERSIAN,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::PERSIAN;

return $parent;
}


Expand Down
7 changes: 4 additions & 3 deletions src/Mapping/Filter/Stop/Portuguese.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ class Portuguese extends \Spameri\ElasticQuery\Mapping\Filter\AbstractStop

public function getStopWords(): array
{
return [
\Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::PORTUGUESE,
];
$parent = parent::getStopWords();
$parent[] = \Spameri\ElasticQuery\Mapping\Analyzer\Stop\StopWords::PORTUGUESE;

return $parent;
}


Expand Down
Loading