JDBC RIver and email

(Garrett Johnson) #1

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.

(Ivan Brusic) #2

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.



(Jörg Prante) #3

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.

(Garrett Johnson) #4

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.

(system) #5