# Improve search results for string fields

**URL:** <https://discuss.elastic.co/t/improve-search-results-for-string-fields/12377>\
**Category:** Elasticsearch\
**Created:** [June 12, 2013, 10:34am UTC](https://discuss.elastic.co/t/improve-search-results-for-string-fields/12377 "2013-06-12T10:34:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Weber](https://avatars.discourse-cdn.com/v4/letter/l/e0b2c6/32.png) [@Lars\_Weber](https://discuss.elastic.co/u/Lars_Weber)\
**Post date:** [June 12, 2013, 10:34am UTC](https://discuss.elastic.co/t/improve-search-results-for-string-fields/12377/1 "2013-06-12T10:34:19Z")

</div>

Hi

I have companies in the ES index with companyName, companyFormerName,  
companyAlternativeName, address (street, city, ...), ...  
Now I want to improve my search results for the companyName.

For example in the index is saved the companyName:

AeroCare AG, but I also want to search by "Aero Care AG" to find this  
company.  
Ha-Ru-Verlags-AG, but I also want to search by "HaRu-Verlags-AG" to find  
this company.  
TravelAgency Scorpio AG, but I also want to search by "Travel Agency  
Scorpio AG" to find this company.

My settings are:

{  
"settings": {  
"analysis": {  
"filter": {  
"name\_ngrams": {  
"side": "front",  
"max\_gram": 5,  
"min\_gram": 1,  
"type": "edgeNGram"  
},  
"name\_stopwords": {  
"type": "stop",  
"stopwords\_path": "conf/analyzer/stopwords/stopwords\_name.txt",  
"ignore\_case": true  
},  
"name\_synonyms": {  
"type": "synonym",  
"synonyms\_path": "conf/analyzer/synonyms/synonyms\_name.txt",  
"ignore\_case": true  
}  
},  
"analyzer": {  
"full\_name": {  
"filter": [  
"standard",  
"lowercase",  
"asciifolding",  
"name\_stopwords",  
"name\_synonyms"  
],  
"type": "custom",  
"tokenizer": "standard"  
},  
"partial\_name": {  
"filter": [  
"standard",  
"lowercase",  
"asciifolding",  
"name\_ngrams",  
"name\_stopwords",  
"name\_synonyms"  
],  
"type": "custom",  
"tokenizer": "standard"  
}  
}  
}  
}  
}

And the mapping for the companyName field:

"companyName":{  
"fields" : {  
"partial":{  
"search\_analyzer":"full\_name",  
"index\_analyzer":"partial\_name",  
"type":"string"  
},  
"companyName":{  
"type":"string",  
"analyzer":"full\_name"  
}  
},  
"type":"multi\_field"  
},

So I think its not enough to work with the word\_delimiter tokenfilter.

Do you have a suggestion for me?

Thanks in advance for your help.

Lars

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:31am UTC](https://discuss.elastic.co/t/improve-search-results-for-string-fields/12377/2 "2017-07-06T02:31:39Z")

</div>


