Demo project for building mappers

Heya,

I just pushed a demo project for building your own mappers.
The main idea of this is to help users (like me) to create your own mappers.

I will probably submit a blog post on that in some days/weeks.

The git repo is here: https://github.com/dadoonet/elasticsearch-mapper-demo
https://github.com/dadoonet/elasticsearch-mapper-demo

This demo mapper define a new type called "demo".

You can define your mapping like this:

{
"person" : {
"properties" : {
"my_demo" : { "type" : "demo" }
}
}
}

And then send a document like this:

{
"my_demo" : "this is a lowercase sentence"
}

It will create another field under my_demo.demo which contains your field but in
upper case (hey, that's just a demo! :wink: )

If you have defined your mapping like this:

{
"person" : {
"properties" : {
"my_demo" : {
"type" : "demo",
"fields" : {
"demo" : {"index" : "not_analyzed"}
}
}
}
}
}

You should be able to create a Term Query (not analyzed) on my_demo.demo with
"THIS IS A LOWERCASE SENTENCE".

Also, you can have a look at integration tests...

Hope this will help some of you.

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--