<?php

final class PhabricatorSearchConfigOptions
  extends PhabricatorApplicationConfigOptions {

  public function getName() {
    return pht('Search');
  }

  public function getDescription() {
    return pht('Options relating to Search.');
  }

  public function getIcon() {
    return 'fa-search';
  }

  public function getGroup() {
    return 'apps';
  }

  public function getOptions() {
    return array(
      $this->newOption('search.elastic.host', 'string', null)
        ->setLocked(true)
        ->setDescription(pht('Elastic Search host.'))
        ->addExample('http://elastic.example.com:9200/', pht('Valid Setting')),
      $this->newOption('search.elastic.namespace', 'string', 'phabricator')
        ->setLocked(true)
        ->setDescription(pht('Elastic Search index.'))
        ->addExample('phabricator2', pht('Valid Setting')),
      $this->newOption('search.elastic.version', 'string', null)
        ->setLocked(true)
        ->setDescription(pht('Elastic Version, used for functions that work for a specific elastic version.')),
      $this->newOption('search.elastic.enabled', 'bool', false)
        ->setDescription(pht('Enable the elasticsearch backend.'))
        ->setBoolOptions(array(pht('Enable: Use elasticsearch'),
                               pht('Disable: Use MySQL')))
    );
  }

}

<?php

final class PhabricatorSearchConfigOptions
  extends PhabricatorApplicationConfigOptions {

  public function getName() {
    return pht('Search');
  }

  public function getDescription() {
    return pht('Options relating to Search.');
  }

  public function getIcon() {
    return 'fa-search';
  }

  public function getGroup() {
    return 'apps';
  }

  public function getOptions() {
    return array(
      $this->newOption('search.elastic.host', 'string', null)
        ->setLocked(true)
        ->setDescription(pht('Elastic Search host.'))
        ->addExample('http://elastic.example.com:9200/', pht('Valid Setting')),
      $this->newOption('search.elastic.namespace', 'string', 'phabricator')
        ->setLocked(true)
        ->setDescription(pht('Elastic Search index.'))
        ->addExample('phabricator2', pht('Valid Setting')),
      $this->newOption('search.elastic.version', 'int', null)
        ->setLocked(true)
        ->setDescription(pht('Elastic Version, used for functions that work for a specific elastic version.')),
      $this->newOption('search.elastic.enabled', 'bool', false)
        ->setDescription(pht('Enable the elasticsearch backend.'))
        ->setBoolOptions(array(pht('Enable: Use elasticsearch'),
                               pht('Disable: Use MySQL')))
    );
  }

}

Make search.elastic.version an int not a string
Make search.elastic.version an int not a string

Summary:
Puppet is not budging in allowing me to use an int so let's just make it a int.

This fixes prod for when we want to change versions too.

Change-Id: I348d674762953433bd77c6ff8efb4246d5d68b73

Reviewers: mmodell, Dzahn

Subscribers: jenkins

Differential Revision: https://phabricator.wikimedia.org/D562
