Yes, sorry for the misleading answer. I didn't realize that by "id", the OP
meant the "_id" field.
*-- jim
*
On Thu, Apr 21, 2011 at 6:17 AM, Shay Banon shay.banon@elasticsearch.comwrote:
No, you can't specify it using an analyzer on the id field. The casing
should be handled before it reaches a shard, since the hashing needs to make
sure to take that into account. It can be added as a feature in the mapping
definition.
On Thursday, April 21, 2011 at 10:27 AM, Mustafa Sener wrote:
I think we cannot specify analyzer for id fields right? I agree with David.
We have same situation here. Some data provider cause duplicate records. I
think at least there should be an option while defining mapping for id
fields.
On Wed, Apr 20, 2011 at 6:20 PM, James Cook jcook@tracermedia.com wrote:
You can specify a custom analyzer which will index the id as a lowercase
value.
In our Elastic Search properties we specify:
index.analysis.analyzer.lowercase_keyword.type=custom
index.analysis.analyzer.lowercase_keyword.tokenizer=keyword
index.analysis.analyzer.lowercase_keyword.filter.0=lowercase
Then in the mapping file, we specify the use of this analyzer:
"username":{"type": "string", "index": "analyzed",
"analyzer":"lowercase_keyword"},
Jim Cook
tracermedia interactive http://www.tracermedia.com/
On Wed, Apr 20, 2011 at 10:07 AM, Mustafa Sener mustafa.sener@gmail.comwrote:
Hi,
In order to get a document with a known id we have to be careful about case
sensitivity. This is problematic in some situations. However, if we
convert all id field to lowercase this problem will be solved. We modified
following files and converted id to its lowercase version.
SinglePingRequest.java
DeleteRequest.java
GetRequest.java
IndexRequest.java
SingleShardOperationRequest.java
Is it possible to make such a modification in ES master? Does it make
sense?
Thanks...
Mustafa Sener
www.ifountain.com
WebRep
Overall rating
--
Mustafa Sener
www.ifountain.com