# White Space Issue / Field Concatenation

**URL:** <https://discuss.elastic.co/t/white-space-issue-field-concatenation/17207>\
**Category:** Elasticsearch\
**Created:** [April 25, 2014, 8:34pm UTC](https://discuss.elastic.co/t/white-space-issue-field-concatenation/17207 "2014-04-25T20:34:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![samuel\_dean](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@samuel\_dean](https://discuss.elastic.co/u/samuel_dean)\
**Post date:** [April 25, 2014, 8:34pm UTC](https://discuss.elastic.co/t/white-space-issue-field-concatenation/17207/1 "2014-04-25T20:34:35Z")

</div>

Hi there

This is the is the issue that we're currently looking to resolve.

Currently we have no issue performing the following.

"_cross trainer_" returning results for "_cross trainer_" and "_crosstrain_  
er"

however, we're looking to get results from searching "_crosstrainer_" to  
give us "_cross trainer_"

Another example

Searching "_London Restaurant_" gives us both "_London Restaurant_" and "  
_LondonRestaurant_" but it wont work vice versa

so searching "_LondonRestaurant_" will not return "_London Restaurant_"

We're seen others have the same issue but would like to know if it's  
possible to get a fix for this.

It't the last outstanding issue we have at the moment.

Thanks for all the help

Sam!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2c8af5f4-f5f1-47c6-acb7-343f7949c2f6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2c8af5f4-f5f1-47c6-acb7-343f7949c2f6%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [April 29, 2014, 5:05am UTC](https://discuss.elastic.co/t/white-space-issue-field-concatenation/17207/2 "2014-04-29T05:05:05Z")

</div>

I have never tried, but I wonder if you can use a shingle filter with an  
empty token separator. If not, you can always output bigrams yourself. Of  
course, this would only work for adjacent terms, so a field with "London  
Restaurant Chinese" will not match the term "LondonChinese".

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

If you know the potential terms that might be conjoined ahead of time, you  
can use synonyms.

Cheers,

Ivan

On Fri, Apr 25, 2014 at 1:34 PM, samuel dean [sam@pricesearcher.com](mailto:sam@pricesearcher.com) wrote:

> Hi there
> 
> This is the is the issue that we're currently looking to resolve.
> 
> Currently we have no issue performing the following.
> 
> "_cross trainer_" returning results for "_cross trainer_" and "  
> _crosstrain_er"
> 
> however, we're looking to get results from searching "_crosstrainer_" to  
> give us "_cross trainer_"
> 
> Another example
> 
> Searching "_London Restaurant_" gives us both "_London Restaurant_" and  
> "_LondonRestaurant_" but it wont work vice versa
> 
> so searching "_LondonRestaurant_" will not return "_London Restaurant_"
> 
> We're seen others have the same issue but would like to know if it's  
> possible to get a fix for this.
> 
> It't the last outstanding issue we have at the moment.
> 
> Thanks for all the help
> 
> Sam!
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/2c8af5f4-f5f1-47c6-acb7-343f7949c2f6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2c8af5f4-f5f1-47c6-acb7-343f7949c2f6%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/2c8af5f4-f5f1-47c6-acb7-343f7949c2f6%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2c8af5f4-f5f1-47c6-acb7-343f7949c2f6%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQAg2EaPQbMB4\_YzHOmuOpf8%2BQVZOKwD\_-mHc\_7obHG\_Jw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQAg2EaPQbMB4_YzHOmuOpf8%2BQVZOKwD_-mHc_7obHG_Jw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [April 29, 2014, 5:18am UTC](https://discuss.elastic.co/t/white-space-issue-field-concatenation/17207/3 "2014-04-29T05:18:51Z")

</div>

Forgot to add the compound word filter:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

I found that maintaining a synonym word list easier than maintaining a word  
list of compound words candidates for my use case.

--  
Ivan

On Mon, Apr 28, 2014 at 10:05 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> I have never tried, but I wonder if you can use a shingle filter with an  
> empty token separator. If not, you can always output bigrams yourself. Of  
> course, this would only work for adjacent terms, so a field with "London  
> Restaurant Chinese" will not match the term "LondonChinese".
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-shingle-tokenfilter.html)
> 
> If you know the potential terms that might be conjoined ahead of time, you  
> can use synonyms.
> 
> Cheers,
> 
> Ivan
> 
> On Fri, Apr 25, 2014 at 1:34 PM, samuel dean [sam@pricesearcher.com](mailto:sam@pricesearcher.com)wrote:
> 
> > Hi there
> > 
> > This is the is the issue that we're currently looking to resolve.
> > 
> > Currently we have no issue performing the following.
> > 
> > "_cross trainer_" returning results for "_cross trainer_" and "  
> > _crosstrain_er"
> > 
> > however, we're looking to get results from searching "_crosstrainer_" to  
> > give us "_cross trainer_"
> > 
> > Another example
> > 
> > Searching "_London Restaurant_" gives us both "_London Restaurant_" and  
> > "_LondonRestaurant_" but it wont work vice versa
> > 
> > so searching "_LondonRestaurant_" will not return "_London Restaurant_"
> > 
> > We're seen others have the same issue but would like to know if it's  
> > possible to get a fix for this.
> > 
> > It't the last outstanding issue we have at the moment.
> > 
> > Thanks for all the help
> > 
> > Sam!
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/2c8af5f4-f5f1-47c6-acb7-343f7949c2f6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2c8af5f4-f5f1-47c6-acb7-343f7949c2f6%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/2c8af5f4-f5f1-47c6-acb7-343f7949c2f6%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2c8af5f4-f5f1-47c6-acb7-343f7949c2f6%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCg7q2iSw9ZmrN8dpr%2BmWEa5oo1WzJoYkavMf\_nmsju4g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCg7q2iSw9ZmrN8dpr%2BmWEa5oo1WzJoYkavMf_nmsju4g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:32am UTC](https://discuss.elastic.co/t/white-space-issue-field-concatenation/17207/4 "2017-07-06T01:32:56Z")

</div>


