Added valence search for search_ion.