Jdbc River not_analyzed possible?

Hello everyone,

i am trying to river a mysql database with battlefield3 playerstats.

the "normal" river is working perfectly. I am getting an index with the
fetched Datas and the update works too.

my problem is, that we have players with names like "foo-barone",
"foo-bartwo" and "bar-foo". The standard analyzer splits the Playernames
like this:

{{"foo", "barone"},{"foo", "bartwo"},{"bar", "foo"}}

now if i am searching the player "bar-foo" i get all three players.

i have read that there is a possibility to set not_analyzed to a field.

Would this be a solution?

An why is this not working?

curl -XPUT 'localhost:9200/_river/soldier_river/_meta' -d '{
"type": "jdbc",
"jdbc" : {
"driver" : "com.mysql.jdbc.Driver",
"url" : "jdbc:mysql://xx.xx.xx.xx:3306/database",
"user" : "user",
"password" : "password",
"poll" : "5s",
"strategy" : "simple",
"sql" : "SELECT pd.SoldierName AS _id , pd.SoldierName as SoldierName,
pd.CountryCode, ps.* FROM tbl_server_player p LEFT JOIN tbl_playerstats ps
ON p.StatsID=ps.StatsID LEFT JOIN tbl_playerdata pd ON
pd.PlayerID=p.PlayerID"
},
"index" : {
"index" : "soliderstats",
"type" : "jdbc",
"index_settings" : {
"number_of_replicas" : 0,
"number_of_shards" : 2
},
"type_mapping" : {
"SoldierName" : {"type" : "string", "index" :
"not_analyzed" }
}
}
}'

hopefully some body can help me solving this.

Br Andreas

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

What precisely is not working? Is the search still returning the 3 results?

When using a field that is not analyzed, the search must match identical
the field being search on. Case is important and no leading/ending text
must appear.

--
Ivan

On Sun, May 19, 2013 at 8:52 AM, Andreas Halemba <andis.blackberry@gmail.com

wrote:

Hello everyone,

i am trying to river a mysql database with battlefield3 playerstats.

the "normal" river is working perfectly. I am getting an index with the
fetched Datas and the update works too.

my problem is, that we have players with names like "foo-barone",
"foo-bartwo" and "bar-foo". The standard analyzer splits the Playernames
like this:

{{"foo", "barone"},{"foo", "bartwo"},{"bar", "foo"}}

now if i am searching the player "bar-foo" i get all three players.

i have read that there is a possibility to set not_analyzed to a field.

Would this be a solution?

An why is this not working?

curl -XPUT 'localhost:9200/_river/soldier_river/_meta' -d '{
"type": "jdbc",
"jdbc" : {
"driver" : "com.mysql.jdbc.Driver",
"url" : "jdbc:mysql://xx.xx.xx.xx:3306/database",
"user" : "user",
"password" : "password",
"poll" : "5s",
"strategy" : "simple",
"sql" : "SELECT pd.SoldierName AS _id , pd.SoldierName as SoldierName,
pd.CountryCode, ps.* FROM tbl_server_player p LEFT JOIN tbl_playerstats ps
ON p.StatsID=ps.StatsID LEFT JOIN tbl_playerdata pd ON
pd.PlayerID=p.PlayerID"
},
"index" : {
"index" : "soliderstats",
"type" : "jdbc",
"index_settings" : {
"number_of_replicas" : 0,
"number_of_shards" : 2
},
"type_mapping" : {
"SoldierName" : {"type" : "string", "index" :
"not_analyzed" }
}
}
}'

hopefully some body can help me solving this.

Br Andreas

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.