we can't create new mapping with current index?
when delete the index, no mapping found and how to create the mapping?
i have doing at reindex side, when reindex back to news, the mapping will same as before without that not-analysed
//1. delete the index
DELETE news
//2 . Create the new index with the new mapping
PUT news
{
"mappings": {
"trkd": {
"properties": {
...your fields go here...
}
}
}
}
//3. Reindex your data
...
// 4. search again
POST /news/_search
{...}
That's correct. Your query simply needs to use the field that is not_analyzed. So if you go with option 1, then your query stays the same, if you go with option 2, then you need to use the .raw fields
If you need both exact searches and full text search, then the first strategy I highlighted is the way to go. You can then do the exact matches on the *.raw fields and the full text search on the normal fields.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.