# JDBC RIver and email

**URL:** <https://discuss.elastic.co/t/jdbc-river-and-email/26024>\
**Category:** Elasticsearch\
**Created:** [July 21, 2015, 9:07pm UTC](https://discuss.elastic.co/t/jdbc-river-and-email/26024 "2015-07-21T21:07:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garrett\_Johnson](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@Garrett\_Johnson](https://discuss.elastic.co/u/Garrett_Johnson)\
**Post date:** [July 21, 2015, 9:07pm UTC](https://discuss.elastic.co/t/jdbc-river-and-email/26024/1 "2015-07-21T21:07:30Z")

</div>

After some research on Anaylzers and mappings it appears that you cannot change a mapping after it has been indexed.

Unfortunately I'm using the JDBC river 1.5.2 and it is mapping Email addresses as strings.

Since it is already indexed as an Analyzed string I cannot find email addresses properly.

It doesn't appear that I can reindex so any Ideas on what I can do? Can i modify the river to let it know not to pick an analyzer? Lots of data to be reindexed and every one thinks the Search sucks because it can't find a simple email address.

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [July 22, 2015, 3:16am UTC](https://discuss.elastic.co/t/jdbc-river-and-email/26024/2 "2015-07-22T03:16:49Z")

</div>

Never used the JDBC River, but you can always create an index with the  
correct mapping before any documents are inserted. You can also use index  
templates in order not to create an index beforehand.

Cheers,

Ivan

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [July 22, 2015, 7:26am UTC](https://discuss.elastic.co/t/jdbc-river-and-email/26024/3 "2015-07-22T07:26:18Z")

</div>

Ivan is correct, the JDBC river does not map email addresses as strings. It is up to you to create indices and mappings beforehand that can then be used by JDBC river.

---

<div class="post-metadata">

**Author:** ![Garrett\_Johnson](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@Garrett\_Johnson](https://discuss.elastic.co/u/Garrett_Johnson)\
**Post date:** [July 22, 2015, 6:04pm UTC](https://discuss.elastic.co/t/jdbc-river-and-email/26024/4 "2015-07-22T18:04:10Z")

</div>

So the solution is  
1. delete the river and the type. = clean slate  
2. Put a mapping which creates the schema for the type  
with No Analyzer on email strings / websites/ phone numbers or uax\_url\_email tokenizer  
3. Recreate the river  
4. Wait to see if I can now search email addresses.

"Email":{"type":"string"} - should change to "Email":{"type":"string"} -- really not sure what to do here... i can't find any examples.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:59pm UTC](https://discuss.elastic.co/t/jdbc-river-and-email/26024/5 "2017-07-05T23:59:52Z")

</div>


