Hi,
I have a big problem with zipcode.
See below my config :
ville:
mappings:
ville_nom:
index_analyzer : cities_index_analyzer
search_analyzer : cities_search_analyzer
type : string
ville_cp:
type: string
index: not_analyzed
But when I run "populate", elasticsearch cut the 0 on the begining of
ville_cp (03000 => 3000).
Someone can help me?
Thanks,
Hari
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0348b69f-5418-4c9d-9f9e-e3ce2425a0fb%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
dadoonet
(David Pilato)
September 19, 2014, 9:16am
2
What gives GET /yourindex/_mapping
Your mapping definition does look like a mapping here
--
David Pilato | Technical Advocate | elasticsearch.com
david.pilato@elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs
Le 19 septembre 2014 à 10:44:31, Hari Rajaonarifetra (rhari44@gmail.com ) a écrit:
Hi,
I have a big problem with zipcode.
See below my config :
ville:
mappings:
ville_nom:
index_analyzer : cities_index_analyzer
search_analyzer : cities_search_analyzer
type : string
ville_cp:
type: string
index: not_analyzed
But when I run "populate", elasticsearch cut the 0 on the begining of ville_cp (03000 => 3000).
Someone can help me?
Thanks,
Hari
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0348b69f-5418-4c9d-9f9e-e3ce2425a0fb%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.541bf471.2eb141f2.18d1%40MacBook-Air-de-David.local .
For more options, visit https://groups.google.com/d/optout .
Thanks for your answer.
GET /ville/_mapping gives this :
{
"my_project":
{
"mappings":
{
"ville":
{
"_meta":
{
"model": "MyProject\ReferenceBundle\Entity\Ville"
},
"properties":
{
"ville_cp":
{
"type": "string",
"index": "not_analyzed",
"store": true
},
"ville_id":
{
"type": "long"
},
"ville_nom":
{
"type": "string",
"store": true,
"index_analyzer": "cities_index_analyzer",
"search_analyzer": "cities_search_analyzer"
}
}
}
}
}
}
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4ff68968-2d01-41cb-96be-deb51ebc4119%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
dadoonet
(David Pilato)
September 19, 2014, 12:08pm
4
Could you GIST a full SENSE script which helps to reproduce your issue?
--
David Pilato | Technical Advocate | elasticsearch.com
david.pilato@elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs
Le 19 septembre 2014 à 14:06:04, Hari Rajaonarifetra (rhari44@gmail.com ) a écrit:
Thanks for your answer.
GET /ville/_mapping gives this :
{ "my_project": { "mappings": { "ville": { "_meta": { "model": "MyProject\ReferenceBundle\Entity\Ville" }, "properties": { "ville_cp": { "type": "string", "index": "not_analyzed", "store": true }, "ville_id": { "type": "long" }, "ville_nom": { "type": "string", "store": true, "index_analyzer": "cities_index_analyzer", "search_analyzer": "cities_search_analyzer" } } } } } }
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4ff68968-2d01-41cb-96be-deb51ebc4119%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.541c1cb9.643c9869.1f5f%40MacBook-Air-de-David.local .
For more options, visit https://groups.google.com/d/optout .
There was something wrong in what I did ?
Thanks a lot,
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a650a6b1-4454-49ec-8dd2-28e8fa59ec81%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
After populating index with this mapping, I just use
http://localhost:9200/_plugin/head/ for testing query.
But when I try to find a city with zipcode:03000 (for example), there is no
result. I check the index with the head navigator and I see that all
zipcode beginning with "0" is cut and indexed without "0" (03000 => 3000).
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8ee8a161-11e4-4394-a3c2-5ce0f768894a%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
jxerome
(Jérôme Mainaud)
September 21, 2014, 7:19pm
7
Hello,
Since your mapping seems valid, I suppose that the zipcode is cast to an
integer during indexation process, when building the document sent to ES.
Could you check the document source of "Moulins" by the CRUD get query ?
GET /ville/ville/
--
Jérôme Mainaud
jerome@mainaud.com
2014-09-19 14:39 GMT+02:00 Hari Rajaonarifetra rhari44@gmail.com :
After populating index with this mapping, I just use
http://localhost:9200/_plugin/head/ for testing query.
But when I try to find a city with zipcode:03000 (for example), there is
no result. I check the index with the head navigator and I see that all
zipcode beginning with "0" is cut and indexed without "0" (03000 => 3000).
--
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 .
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8ee8a161-11e4-4394-a3c2-5ce0f768894a%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/8ee8a161-11e4-4394-a3c2-5ce0f768894a%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout .
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAJXyu8n67Ab%2BBgCCfUWT222zxUpbhXD2We1GUeRLKV4diKSvhg%40mail.gmail.com .
For more options, visit https://groups.google.com/d/optout .