# Searching with spaces

**URL:** <https://discuss.elastic.co/t/searching-with-spaces/8965>\
**Category:** Elasticsearch\
**Created:** [September 10, 2012, 3:55am UTC](https://discuss.elastic.co/t/searching-with-spaces/8965 "2012-09-10T03:55:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Renu\_y](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Renu\_y](https://discuss.elastic.co/u/Renu_y)\
**Post date:** [September 10, 2012, 3:55am UTC](https://discuss.elastic.co/t/searching-with-spaces/8965/1 "2012-09-10T03:55:49Z")

</div>

Hi,  
I am indexing a field "name" in multiple ways (not using multifield).  
One index is for exact match (keyword lower\_case)  
One index is for using standard analyzer  
One index is using ngram analyzer  
One index is using doublemetaphone.

the app should respond back with the best possible match.

Suppose there are multiple records indexed with "center" and "centre" in it.  
Example : "home centre", "epicenter", "epicetre", "mall center" etc.

And if I search for "epi center" I would want "epicenter" and "epicentre"  
to come out with more score than "home centre"

This doesnt happen. Any pointers as to how this can be done without using a  
gsub(space , '')

For the common eye "epicenter" or epicentre" matches more closely to "epi  
centre" however the "Home centre" gets more priority and messes up my result  
set.

Thanks  
ry

--  
View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/searching-with-spaces-tp4022554.html](http://elasticsearch-users.115913.n3.nabble.com/searching-with-spaces-tp4022554.html)  
Sent from the ElasticSearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--

---

<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 6, 2017, 3:13am UTC](https://discuss.elastic.co/t/searching-with-spaces/8965/2 "2017-07-06T03:13:30Z")

</div>


