Commit e1819c1c authored by Arnaud Bey's avatar Arnaud Bey
Browse files

add index on clean value

parent 745c6643
...@@ -6,9 +6,13 @@ use Doctrine\Common\Collections\ArrayCollection; ...@@ -6,9 +6,13 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use JsonSerializable; use JsonSerializable;
use Doctrine\ORM\Mapping\Index;
/** /**
* @ORM\Table(name="lexicon_word") * @ORM\Table(name="lexicon_word", indexes={
* @Index(columns={"clean_value"}, name="cleanValue"),
* @Index(name="language", columns={"language_id"}),
* }))
* @ORM\Entity(repositoryClass="LexiconBundle\Repository\WordRepository") * @ORM\Entity(repositoryClass="LexiconBundle\Repository\WordRepository")
*/ */
class Word implements JsonSerializable class Word implements JsonSerializable
......
...@@ -48,6 +48,7 @@ class GridManager ...@@ -48,6 +48,7 @@ class GridManager
public function generate(Language $language, $debug = false, $minBigram = null) public function generate(Language $language, $debug = false, $minBigram = null)
{ {
$grid = $this->newGrid($language, 4); $grid = $this->newGrid($language, 4);
$minBigram = ($minBigram == null) ? $language->getMinBigram() : $minBigram; $minBigram = ($minBigram == null) ? $language->getMinBigram() : $minBigram;
$letters = $this->lottery($language, 4, $debug, $minBigram); $letters = $this->lottery($language, 4, $debug, $minBigram);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment