# Relevance with short combinations of letters

**URL:** https://discuss.elastic.co/t/relevance-with-short-combinations-of-letters/127813
**Category:** Elasticsearch
**Created:** [April 12, 2018, 12:25pm UTC](https://discuss.elastic.co/t/relevance-with-short-combinations-of-letters/127813 "2018-04-12T12:25:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Snail\_Banshee](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@Snail\_Banshee](https://discuss.elastic.co/u/Snail_Banshee)
#### Post date: [April 12, 2018, 12:25pm UTC](https://discuss.elastic.co/t/relevance-with-short-combinations-of-letters/127813/1 "2018-04-12T12:25:12Z")

</div>

Hello, everyone!🙂  
I`m trying to make relevant search for cars (inc. brands models and part names),  
for example search request is: "air filter audi a3".

My settings (sorry for php array):  
'settings' =\> [  
'analysis' =\> [  
'filter'=\>[  
'ru\_stop'=\>[  
"type"=\>"stop",  
"stopwords"=\>"_russian_"  
],  
'ru\_stemmer'=\>[  
"type"=\>"stemmer",  
"language"=\>"russian"  
],  
'english\_stop'=\>[  
"type"=\>"stop",  
"stopwords"=\>"_english_"  
],  
'english\_stemmer'=\>[  
"type"=\>"stemmer",  
"language"=\>"english"  
],  
'synonym'=\>[  
"type"=\>"synonym",  
"synonyms\_path"=\>$this-\>iCustom-\>iDRoot."/files/es\_synonyms.txt"  
],  
'snowball'=\>[  
"type"=\>"snowball",  
"language"=\>"Russian"  
],  
"word\_delimiter"=\>[  
"type"=\>"word\_delimiter",  
"split\_on\_numerics"=\>false,  
"split\_on\_case\_change"=\>false,  
"generate\_word\_parts"=\>true,  
"generate\_number\_parts"=\>false,  
"catenate\_words"=\>true,  
'preserve\_original'=\>true  
],  
'ascii\_folding'=\>[  
"type"=\>"asciifolding",  
"preserve\_original"=\>true  
],  
'gram\_filter'=\>[  
'type'=\>'nGram',  
'min\_gram'=\>3,  
'max\_gram'=\>15,  
'token\_chars'=\>[  
'letter',  
'digit'  
]  
],  
'unique\_stem'=\>[  
'type'=\>'unique',  
'only\_on\_same\_position'=\>true  
],  
'length\_filter'=\>[  
'type'=\>'length',  
'min'=\>2,  
'max'=\>20  
],  
],  
'tokenizer'=\>[  
'gram\_tokenizer'=\>[  
'type'=\>'nGram',  
'min\_gram'=\>3,  
'max\_gram'=\>15,  
'token\_chars'=\>[  
'letter',  
'digit'  
]  
]  
],  
'analyzer'=\>[  
'default'=\>[  
'type'=\>'custom',  
"char\_filter"=\>[  
"html\_strip"  
],  
"tokenizer"=\>'standard',  
"filter"=\>[  
'trim',  
"lowercase",  
"word\_delimiter",  
"snowball",  
"ascii\_folding",  
//"keyword\_repeat",  
//"unique\_stem",  
"ru\_stop",  
"ru\_stemmer",  
"english\_stop",  
"english\_stemmer",  
"synonym",  
'length\_filter',  
//"gram\_filter",  
]  
]  
]  
]  
],  
'mappings'=\>[  
'item'=\>[  
'properties'=\>[  
"title"=\>[  
"type"=\>"string",  
"index"=\>"not\_analyzed",  
'index\_options'=\>'docs',  
],  
"data"=\>[  
"type"=\>"string",  
'analyzer'=\>'default',  
],  
"description"=\>[  
"type"=\>"string",  
"analyzer"=\>"default",  
"store"=\>true  
],  
"numbers"=\>[  
"type"=\>"string",  
"store"=\>true,  
"index"=\>"not\_analyzed"  
],  
"timestamp"=\>[  
"type"=\>"integer",  
"index"=\>"not\_analyzed"  
],  
]  
]  
]

Some "data" in ES:

- Air filter MAPCO 65217; AUDI A4 (8E2, B6) 1.8 T 2002 2001 2000; AUDI A4 Avant (8E5, B6) 1.8 T 2002 2001;
- Air filter: Air filter MAGNETI MARELLI 153071760244; AUDI A4 (8K2, B8) 1.8 TFSI 2012 2011 2010 2009 2008 2007; AUDI A4 Avant (8K5, B8) 1.8 TFSI 2012 2011 2010 2009 2008 2007;
- Air filter FEBI BILSTEIN 48477; AUDI Q7 (4LB) 3.0 TDI quattro 2008 2007 2006; VW TOUAREG (7LA, 7L6, 7L7) 2.5 R5 TDI 2010 2009 2008 2007 2006 2005 2004 2003;
- Air filter: Air filter FRAM CA10236; AUDI Q7 (4LB) 3.0 TDI quattro 2010 2009 2008 2007 2006; AUDI A3 (8V1, 8VK) S3 quattro 2018 2017 2016 2015 2014 2013 2012; PORSCHE CAYENNE (9PA) 3.0 TDI 2010 2009;
- Inside air filter FRAM CFA8869; AUDI TT Roadster (8N9) 1.8 T 2006 2005 2004 2003 2002 2001 2000 1999; AUDI A3 (8L1) 1.6 2003 2002 2001 2000 1999 1998 1997 1996; AUDI TT (8N3) 1.8 T 2006 2005 2004 2003 2002 2001 2000 1999 1998;

etc...

So, i have response with score for data that contains Audi A3 lower than forexample Audi A4 or Audi Q7, etc.  
Why is it so?

P.S.: i`m new at ES, so do not judge strictly:))  
Thank2all!

---

<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: [May 10, 2018, 12:25pm UTC](https://discuss.elastic.co/t/relevance-with-short-combinations-of-letters/127813/2 "2018-05-10T12:25:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
