Templates to include settings

Hi,

I have a working deployment using elasticsearch on a medium scale (500
million docs so far and growing), It's pretty much your standard log
scenario so we opted for the index per day design. It works perfectly, we
had a template that matches index names 'mylog*' and it just had the
correct mapping for every index. Only problem is when I started using a
custom analyzers I couldn't get those to be set by the template (had a
settings section, and upon creation I get the right mapping but not
analyzers). I was wondering if someone can point me to how to do this. Is
there a place where I can define my analyzers globally in file and just
refer to them from the template instead of trying to define them everytime?

--

On Mon, Jan 21, 2013 at 11:08 AM, Mo mohammady.mahdy@gmail.com wrote:

Hi,

I have a working deployment using elasticsearch on a medium scale (500
million docs so far and growing), It's pretty much your standard log
scenario so we opted for the index per day design. It works perfectly, we
had a template that matches index names 'mylog*' and it just had the
correct mapping for every index. Only problem is when I started using a
custom analyzers I couldn't get those to be set by the template (had a
settings section, and upon creation I get the right mapping but not
analyzers). I was wondering if someone can point me to how to do this. Is
there a place where I can define my analyzers globally in file and just
refer to them from the template instead of trying to define them everytime?

--

--
http://sematext.com/ -- Elasticsearch -- Solr -- Lucene

--

Retry :slight_smile:

OK, so I don't know of an option to do exactly what you want, but you can
define multiple templates, and the new indices will try to merge those
settings. So you can have a template that matches "*" with your analyzer
settings, and different templates with your other settings.

Best regards,
Radu

http://sematext.com/ -- Elasticsearch -- Solr -- Lucene

On Mon, Jan 21, 2013 at 4:55 PM, Radu Gheorghe
radu.gheorghe@sematext.comwrote:

On Mon, Jan 21, 2013 at 11:08 AM, Mo mohammady.mahdy@gmail.com wrote:

Hi,

I have a working deployment using elasticsearch on a medium scale (500
million docs so far and growing), It's pretty much your standard log
scenario so we opted for the index per day design. It works perfectly, we
had a template that matches index names 'mylog*' and it just had the
correct mapping for every index. Only problem is when I started using a
custom analyzers I couldn't get those to be set by the template (had a
settings section, and upon creation I get the right mapping but not
analyzers). I was wondering if someone can point me to how to do this. Is
there a place where I can define my analyzers globally in file and just
refer to them from the template instead of trying to define them everytime?

--

--
http://sematext.com/ -- Elasticsearch -- Solr -- Lucene

--

You can define your custom analyzers in elasticsearch.yml and use them in
any index.

--
Ivan
On Jan 21, 2013 1:09 AM, "Mo" mohammady.mahdy@gmail.com wrote:

Hi,

I have a working deployment using elasticsearch on a medium scale (500
million docs so far and growing), It's pretty much your standard log
scenario so we opted for the index per day design. It works perfectly, we
had a template that matches index names 'mylog*' and it just had the
correct mapping for every index. Only problem is when I started using a
custom analyzers I couldn't get those to be set by the template (had a
settings section, and upon creation I get the right mapping but not
analyzers). I was wondering if someone can point me to how to do this. Is
there a place where I can define my analyzers globally in file and just
refer to them from the template instead of trying to define them everytime?

--

--