Case In/Sensitive Searching


(bailey) #1

Hi All-

I know that case insensitive searching has been covered in a couple
other threads but I feel like this question is a little different.

We have two fields that need to be case insensitive when we search for
them as they need to be completely unique across the application, say
fields "username" and "emailAddress".

Setting the "username" field to be analyzed solves the issue for it as
we only want alphanumeric characters to comprise the username (I feel
like we would be in trouble though if we had to set it as "analyzed").
But if we set "emailAddress" to be analyzed will the default analyzer
split it based on the "@" symbol (therefore returning anything that
matches after the @ symbol)?

Is there a configuration (or query parameters) to have a field set to
"not_analyzed" but still search case insensitively?

Thanks!


(bailey) #2

"(I feel like we would be in trouble though if we had to set it as
"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set it as
"analyzed" and accepted any characters like dashes, underscores,
etc...)."

On Sep 23, 1:47 pm, bailey matt.bai...@gmail.com wrote:

Hi All-

I know that case insensitive searching has been covered in a couple
other threads but I feel like this question is a little different.

We have two fields that need to be case insensitive when we search for
them as they need to be completely unique across the application, say
fields "username" and "emailAddress".

Setting the "username" field to be analyzed solves the issue for it as
we only want alphanumeric characters to comprise the username (I feel
like we would be in trouble though if we had to set it as "analyzed").
But if we set "emailAddress" to be analyzed will the default analyzer
split it based on the "@" symbol (therefore returning anything that
matches after the @ symbol)?

Is there a configuration (or query parameters) to have a field set to
"not_analyzed" but still search case insensitively?

Thanks!


(Clinton Gormley) #3

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to set it as
"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set it as
"analyzed" and accepted any characters like dashes, underscores,
etc...)."

You will need to create a custom analyzer using the lowercase token
filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysis/
http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysis/tokenfilter/lowercase

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(ppearcy) #4

FYI, here is the analyzer I created for this same case:

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Had a little confusion, until I figured out that filter needed an
array.

Regards,
Paul

On Sep 23, 12:00 pm, Clinton Gormley clin...@iannounce.co.uk wrote:

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to set it as
"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set it as
"analyzed" and accepted any characters like dashes, underscores,
etc...)."

You will need to create a custom analyzer using the lowercase token
filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysis/http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysi...

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(bailey) #5

Thanks Paul.
If I was adding this to an ElasticSearch .properties file would the
correct syntax be:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter=[lowercase]
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

On Sep 23, 7:53 pm, Paul ppea...@gmail.com wrote:

FYI, here is the analyzer I created for this same case:

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Had a little confusion, until I figured out that filter needed an
array.

Regards,
Paul

On Sep 23, 12:00 pm, Clinton Gormley clin...@iannounce.co.uk wrote:

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to set it as
"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set it as
"analyzed" and accepted any characters like dashes, underscores,
etc...)."

You will need to create a custom analyzer using the lowercase token
filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysi......

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(Shay Banon) #6

Properties files are a pain when it comes to array definitions, before I
suggest the format, can you simply use yaml/json and load elasticsearch with
it?

On Sat, Sep 25, 2010 at 12:47 AM, bailey matt.bailey@gmail.com wrote:

Thanks Paul.
If I was adding this to an ElasticSearch .properties file would the
correct syntax be:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter=[lowercase]
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

On Sep 23, 7:53 pm, Paul ppea...@gmail.com wrote:

FYI, here is the analyzer I created for this same case:

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Had a little confusion, until I figured out that filter needed an
array.

Regards,
Paul

On Sep 23, 12:00 pm, Clinton Gormley clin...@iannounce.co.uk wrote:

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to set it as
"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set it as
"analyzed" and accepted any characters like dashes, underscores,
etc...)."

You will need to create a custom analyzer using the lowercase token
filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysi....
..

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(James Cook) #7

Hi shay,
My ES instance is bootstrapped and configured via spring. I load the server
properties from a properties file because that is what Spring supports.

Is this array format you allude to able to be loaded using Java's property
file support?

On Sep 24, 2010 6:58 PM, "Shay Banon" shay.banon@elasticsearch.com wrote:

Properties files are a pain when it comes to array definitions, before I
suggest the format, can you simply use yaml/json and load elasticsearch
with
it?

On Sat, Sep 25, 2010 at 12:47 AM, bailey matt.bailey@gmail.com wrote:

Thanks Paul.
If I was adding this to an ElasticSearch .properties file would the
correct syntax be:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter=[lowercase]
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

On Sep 23, 7:53 pm, Paul ppea...@gmail.com wrote:

FYI, here is the analyzer I created for this same case:

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Had a little confusion, until I figured out that filter needed an
array.

Regards,
Paul

On Sep 23, 12:00 pm, Clinton Gormley clin...@iannounce.co.uk wrote:

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to set it as
"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set it as
"analyzed" and accepted any characters like dashes, underscores,
etc...)."

You will need to create a custom analyzer using the lowercase token
filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysi....
..

clint

--
Web Announcements Limited is a company registered in England and
Wales,

with company number 05608868, with registered address at 10 Arvon
Road,

London, N5 1PR.


(Shay Banon) #8

Let me explain what I allude you are able to do (though not collude, which
seems to be making twitter noise lately...):

First, Spring does not imply using just properties files. Its your decision
to use properties files as a configuration format or not, spring does not
enforce you to use it.

You can easily configure elasticsearch to load the settings from an external
(classpath, or other) configuration file using json or yaml. Custom ${...}
values will automatically be replaced with system properties. Check the
SettingsLoader and different implementations.

If you do want to use properties files, then suffixing
the appropriate setting with .0, .1 and so on will imply its an array. Off,
sorry, allude its an array.

On Sat, Sep 25, 2010 at 6:53 PM, James Cook jcook@tracermedia.com wrote:

Hi shay,
My ES instance is bootstrapped and configured via spring. I load the server
properties from a properties file because that is what Spring supports.

Is this array format you allude to able to be loaded using Java's property
file support?

On Sep 24, 2010 6:58 PM, "Shay Banon" shay.banon@elasticsearch.com
wrote:

Properties files are a pain when it comes to array definitions, before I
suggest the format, can you simply use yaml/json and load elasticsearch
with
it?

On Sat, Sep 25, 2010 at 12:47 AM, bailey matt.bailey@gmail.com wrote:

Thanks Paul.
If I was adding this to an ElasticSearch .properties file would the
correct syntax be:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter=[lowercase]
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

On Sep 23, 7:53 pm, Paul ppea...@gmail.com wrote:

FYI, here is the analyzer I created for this same case:

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Had a little confusion, until I figured out that filter needed an
array.

Regards,
Paul

On Sep 23, 12:00 pm, Clinton Gormley clin...@iannounce.co.uk wrote:

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to set it as
"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set it as
"analyzed" and accepted any characters like dashes, underscores,
etc...)."

You will need to create a custom analyzer using the lowercase token
filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysi..
..

..

clint

--
Web Announcements Limited is a company registered in England and
Wales,

with company number 05608868, with registered address at 10 Arvon
Road,

London, N5 1PR.


(James Cook) #9

Thanks for sharing the arrays format.

On Sat, Sep 25, 2010 at 6:30 PM, Shay Banon shay.banon@elasticsearch.comwrote:

Let me explain what I allude you are able to do (though not collude, which
seems to be making twitter noise lately...):

First, Spring does not imply using just properties files. Its your decision
to use properties files as a configuration format or not, spring does not
enforce you to use it.

You can easily configure elasticsearch to load the settings from an
external (classpath, or other) configuration file using json or yaml. Custom
${...} values will automatically be replaced with system properties. Check
the SettingsLoader and different implementations.

If you do want to use properties files, then suffixing
the appropriate setting with .0, .1 and so on will imply its an array. Off,
sorry, allude its an array.

On Sat, Sep 25, 2010 at 6:53 PM, James Cook jcook@tracermedia.com wrote:

Hi shay,
My ES instance is bootstrapped and configured via spring. I load the
server properties from a properties file because that is what Spring
supports.

Is this array format you allude to able to be loaded using Java's property
file support?

On Sep 24, 2010 6:58 PM, "Shay Banon" shay.banon@elasticsearch.com
wrote:

Properties files are a pain when it comes to array definitions, before I
suggest the format, can you simply use yaml/json and load elasticsearch
with
it?

On Sat, Sep 25, 2010 at 12:47 AM, bailey matt.bailey@gmail.com wrote:

Thanks Paul.
If I was adding this to an ElasticSearch .properties file would the
correct syntax be:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter=[lowercase]
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

On Sep 23, 7:53 pm, Paul ppea...@gmail.com wrote:

FYI, here is the analyzer I created for this same case:

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Had a little confusion, until I figured out that filter needed an
array.

Regards,
Paul

On Sep 23, 12:00 pm, Clinton Gormley clin...@iannounce.co.uk
wrote:

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to set it
as

"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set it
as

"analyzed" and accepted any characters like dashes, underscores,
etc...)."

You will need to create a custom analyzer using the lowercase token
filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysi....

..

clint

--
Web Announcements Limited is a company registered in England and
Wales,

with company number 05608868, with registered address at 10 Arvon
Road,

London, N5 1PR.


(bailey) #10

Thanks for the input guys.

I changed the .properties file to:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter.0=lowercase
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

But I'm still getting some errors (i.e. "Analyzer [lowercase_keyword]
not found") when I associate a file to "analyzer":"lowercase_keyword"
in the mapping.
Anything I'm missing here?

On Sep 25, 6:49 pm, James Cook jc...@tracermedia.com wrote:

Thanks for sharing the arrays format.

On Sat, Sep 25, 2010 at 6:30 PM, Shay Banon shay.ba...@elasticsearch.comwrote:

Let me explain what I allude you are able to do (though not collude, which
seems to be making twitter noise lately...):

First, Spring does not imply using just properties files. Its your decision
to use properties files as a configuration format or not, spring does not
enforce you to use it.

You can easily configure elasticsearch to load the settings from an
external (classpath, or other) configuration file using json or yaml. Custom
${...} values will automatically be replaced with system properties. Check
the SettingsLoader and different implementations.

If you do want to use properties files, then suffixing
the appropriate setting with .0, .1 and so on will imply its an array. Off,
sorry, allude its an array.

On Sat, Sep 25, 2010 at 6:53 PM, James Cook jc...@tracermedia.com wrote:

Hi shay,
My ES instance is bootstrapped and configured via spring. I load the
server properties from a properties file because that is what Spring
supports.

Is this array format you allude to able to be loaded using Java's property
file support?

On Sep 24, 2010 6:58 PM, "Shay Banon" shay.ba...@elasticsearch.com
wrote:

Properties files are a pain when it comes to array definitions, before I
suggest the format, can you simply use yaml/json and load elasticsearch
with
it?

On Sat, Sep 25, 2010 at 12:47 AM, bailey matt.bai...@gmail.com wrote:

Thanks Paul.
If I was adding this to an ElasticSearch .properties file would the
correct syntax be:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter=[lowercase]
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

On Sep 23, 7:53 pm, Paul ppea...@gmail.com wrote:

FYI, here is the analyzer I created for this same case:

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Had a little confusion, until I figured out that filter needed an
array.

Regards,
Paul

On Sep 23, 12:00 pm, Clinton Gormley clin...@iannounce.co.uk
wrote:

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to set it
as

"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set it
as

"analyzed" and accepted any characters like dashes, underscores,
etc...)."

You will need to create a custom analyzer using the lowercase token
filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysi....

..

clint

--
Web Announcements Limited is a company registered in England and
Wales,

with company number 05608868, with registered address at 10 Arvon
Road,

London, N5 1PR.


(Shay Banon) #11

This settings seem ok. Can you recreate this with fresh elasticsearch
install, rename elasticsearch.yml to elasticsearch.properties, place the
relevant properties and gist a curl recreation?

On Sun, Sep 26, 2010 at 5:44 PM, bailey matt.bailey@gmail.com wrote:

Thanks for the input guys.

I changed the .properties file to:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter.0=lowercase
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

But I'm still getting some errors (i.e. "Analyzer [lowercase_keyword]
not found") when I associate a file to "analyzer":"lowercase_keyword"
in the mapping.
Anything I'm missing here?

On Sep 25, 6:49 pm, James Cook jc...@tracermedia.com wrote:

Thanks for sharing the arrays format.

On Sat, Sep 25, 2010 at 6:30 PM, Shay Banon <
shay.ba...@elasticsearch.com>wrote:

Let me explain what I allude you are able to do (though not collude,
which

seems to be making twitter noise lately...):

First, Spring does not imply using just properties files. Its your
decision

to use properties files as a configuration format or not, spring does
not

enforce you to use it.

You can easily configure elasticsearch to load the settings from an
external (classpath, or other) configuration file using json or yaml.
Custom

${...} values will automatically be replaced with system properties.
Check

the SettingsLoader and different implementations.

If you do want to use properties files, then suffixing
the appropriate setting with .0, .1 and so on will imply its an array.
Off,

sorry, allude its an array.

On Sat, Sep 25, 2010 at 6:53 PM, James Cook jc...@tracermedia.com
wrote:

Hi shay,
My ES instance is bootstrapped and configured via spring. I load the
server properties from a properties file because that is what Spring
supports.

Is this array format you allude to able to be loaded using Java's
property

file support?

On Sep 24, 2010 6:58 PM, "Shay Banon" shay.ba...@elasticsearch.com
wrote:

Properties files are a pain when it comes to array definitions,
before I

suggest the format, can you simply use yaml/json and load
elasticsearch

with

it?

On Sat, Sep 25, 2010 at 12:47 AM, bailey matt.bai...@gmail.com
wrote:

Thanks Paul.
If I was adding this to an ElasticSearch .properties file would the
correct syntax be:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter=[lowercase]
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

On Sep 23, 7:53 pm, Paul ppea...@gmail.com wrote:

FYI, here is the analyzer I created for this same case:

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Had a little confusion, until I figured out that filter needed an
array.

Regards,
Paul

On Sep 23, 12:00 pm, Clinton Gormley clin...@iannounce.co.uk
wrote:

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to set
it

as

"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set
it

as

"analyzed" and accepted any characters like dashes,
underscores,

etc...)."

You will need to create a custom analyzer using the lowercase
token

filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysi....

..

clint

--
Web Announcements Limited is a company registered in England
and

Wales,

with company number 05608868, with registered address at 10
Arvon

Road,

London, N5 1PR.


(James Cook) #12

The error was caused because we added the custom analyzer config to our ES
server config only. The ES clients did not have this information and were
the cause of the exception.

On Sun, Sep 26, 2010 at 4:47 PM, Shay Banon shay.banon@elasticsearch.comwrote:

This settings seem ok. Can you recreate this with fresh elasticsearch
install, rename elasticsearch.yml to elasticsearch.properties, place the
relevant properties and gist a curl recreation?

On Sun, Sep 26, 2010 at 5:44 PM, bailey matt.bailey@gmail.com wrote:

Thanks for the input guys.

I changed the .properties file to:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter.0=lowercase
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

But I'm still getting some errors (i.e. "Analyzer [lowercase_keyword]
not found") when I associate a file to "analyzer":"lowercase_keyword"
in the mapping.
Anything I'm missing here?

On Sep 25, 6:49 pm, James Cook jc...@tracermedia.com wrote:

Thanks for sharing the arrays format.

On Sat, Sep 25, 2010 at 6:30 PM, Shay Banon <
shay.ba...@elasticsearch.com>wrote:

Let me explain what I allude you are able to do (though not collude,
which

seems to be making twitter noise lately...):

First, Spring does not imply using just properties files. Its your
decision

to use properties files as a configuration format or not, spring does
not

enforce you to use it.

You can easily configure elasticsearch to load the settings from an
external (classpath, or other) configuration file using json or yaml.
Custom

${...} values will automatically be replaced with system properties.
Check

the SettingsLoader and different implementations.

If you do want to use properties files, then suffixing
the appropriate setting with .0, .1 and so on will imply its an array.
Off,

sorry, allude its an array.

On Sat, Sep 25, 2010 at 6:53 PM, James Cook jc...@tracermedia.com
wrote:

Hi shay,
My ES instance is bootstrapped and configured via spring. I load the
server properties from a properties file because that is what Spring
supports.

Is this array format you allude to able to be loaded using Java's
property

file support?

On Sep 24, 2010 6:58 PM, "Shay Banon" shay.ba...@elasticsearch.com
wrote:

Properties files are a pain when it comes to array definitions,
before I

suggest the format, can you simply use yaml/json and load
elasticsearch

with

it?

On Sat, Sep 25, 2010 at 12:47 AM, bailey matt.bai...@gmail.com
wrote:

Thanks Paul.
If I was adding this to an ElasticSearch .properties file would
the

correct syntax be:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter=[lowercase]
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

On Sep 23, 7:53 pm, Paul ppea...@gmail.com wrote:

FYI, here is the analyzer I created for this same case:

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Had a little confusion, until I figured out that filter needed
an

array.

Regards,
Paul

On Sep 23, 12:00 pm, Clinton Gormley clin...@iannounce.co.uk
wrote:

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to set
it

as

"analyzed")."

should read

"(I feel like we would be in trouble though if we had to set
it

as

"analyzed" and accepted any characters like dashes,
underscores,

etc...)."

You will need to create a custom analyzer using the lowercase
token

filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysi....

..

clint

--
Web Announcements Limited is a company registered in England
and

Wales,

with company number 05608868, with registered address at 10
Arvon

Road,

London, N5 1PR.


(Shay Banon) #13

You can always provide the analyzes as part of the index configuration when
you create an index (And not part of the node configuration), then it will
propagate through the nodes.

-shay.banon

On Mon, Sep 27, 2010 at 6:27 PM, James Cook jcook@tracermedia.com wrote:

The error was caused because we added the custom analyzer config to our ES
server config only. The ES clients did not have this information and were
the cause of the exception.

On Sun, Sep 26, 2010 at 4:47 PM, Shay Banon shay.banon@elasticsearch.comwrote:

This settings seem ok. Can you recreate this with fresh elasticsearch
install, rename elasticsearch.yml to elasticsearch.properties, place the
relevant properties and gist a curl recreation?

On Sun, Sep 26, 2010 at 5:44 PM, bailey matt.bailey@gmail.com wrote:

Thanks for the input guys.

I changed the .properties file to:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter.0=lowercase
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

But I'm still getting some errors (i.e. "Analyzer [lowercase_keyword]
not found") when I associate a file to "analyzer":"lowercase_keyword"
in the mapping.
Anything I'm missing here?

On Sep 25, 6:49 pm, James Cook jc...@tracermedia.com wrote:

Thanks for sharing the arrays format.

On Sat, Sep 25, 2010 at 6:30 PM, Shay Banon <
shay.ba...@elasticsearch.com>wrote:

Let me explain what I allude you are able to do (though not collude,
which

seems to be making twitter noise lately...):

First, Spring does not imply using just properties files. Its your
decision

to use properties files as a configuration format or not, spring does
not

enforce you to use it.

You can easily configure elasticsearch to load the settings from an
external (classpath, or other) configuration file using json or yaml.
Custom

${...} values will automatically be replaced with system properties.
Check

the SettingsLoader and different implementations.

If you do want to use properties files, then suffixing
the appropriate setting with .0, .1 and so on will imply its an
array. Off,

sorry, allude its an array.

On Sat, Sep 25, 2010 at 6:53 PM, James Cook jc...@tracermedia.com
wrote:

Hi shay,
My ES instance is bootstrapped and configured via spring. I load the
server properties from a properties file because that is what Spring
supports.

Is this array format you allude to able to be loaded using Java's
property

file support?

On Sep 24, 2010 6:58 PM, "Shay Banon" <shay.ba...@elasticsearch.com

wrote:

Properties files are a pain when it comes to array definitions,
before I

suggest the format, can you simply use yaml/json and load
elasticsearch

with

it?

On Sat, Sep 25, 2010 at 12:47 AM, bailey matt.bai...@gmail.com
wrote:

Thanks Paul.
If I was adding this to an ElasticSearch .properties file would
the

correct syntax be:

index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.filter=[lowercase]
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword

On Sep 23, 7:53 pm, Paul ppea...@gmail.com wrote:

FYI, here is the analyzer I created for this same case:

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Had a little confusion, until I figured out that filter needed
an

array.

Regards,
Paul

On Sep 23, 12:00 pm, Clinton Gormley clin...@iannounce.co.uk
wrote:

On Thu, 2010-09-23 at 10:50 -0700, bailey wrote:

"(I feel like we would be in trouble though if we had to
set it

as

"analyzed")."

should read

"(I feel like we would be in trouble though if we had to
set it

as

"analyzed" and accepted any characters like dashes,
underscores,

etc...)."

You will need to create a custom analyzer using the lowercase
token

filter:

http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysi..
..

..

clint

--
Web Announcements Limited is a company registered in England
and

Wales,

with company number 05608868, with registered address at 10
Arvon

Road,

London, N5 1PR.


(system) #14