# Help on searching solution

**URL:** <https://discuss.elastic.co/t/help-on-searching-solution/7141>\
**Category:** Elasticsearch\
**Created:** [March 27, 2012, 6:49am UTC](https://discuss.elastic.co/t/help-on-searching-solution/7141 "2012-03-27T06:49:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anhthu](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@anhthu](https://discuss.elastic.co/u/anhthu)\
**Post date:** [March 27, 2012, 6:49am UTC](https://discuss.elastic.co/t/help-on-searching-solution/7141/1 "2012-03-27T06:49:46Z")

</div>

Hi,

I have a query string is "company", I expect that search result can  
contain one or many below tokens:

"company"  
"xxcompany"  
"companyxx"  
"xxcompanyxx"  
"kompany"  
"xxkompany"  
"kompanyxx"  
"xxkompanyxx"

I've tried using phonetic filter and fuzzy search query\_string but it  
did not succeed. Could anyone help me on this, it's really  
appreciated.

Cheers, Thu

---

<div class="post-metadata">

**Author:** ![thinusp](https://avatars.discourse-cdn.com/v4/letter/t/da6949/32.png) [@thinusp](https://discuss.elastic.co/u/thinusp)\
**Post date:** [March 27, 2012, 6:54am UTC](https://discuss.elastic.co/t/help-on-searching-solution/7141/2 "2012-03-27T06:54:52Z")

</div>

Do you literally mean "xx", or is that your way of saying "anything", as in  
"company\*" and "\*company" etc.?

On Tuesday, 27 March 2012 08:49:46 UTC+2, Anh Thu wrote:

> Hi,
> 
> I have a query string is "company", I expect that search result can  
> contain one or many below tokens:
> 
> "company"  
> "xxcompany"  
> "companyxx"  
> "xxcompanyxx"  
> "kompany"  
> "xxkompany"  
> "kompanyxx"  
> "xxkompanyxx"
> 
> I've tried using phonetic filter and fuzzy search query\_string but it  
> did not succeed. Could anyone help me on this, it's really  
> appreciated.
> 
> Cheers, Thu

---

<div class="post-metadata">

**Author:** ![anhthu](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@anhthu](https://discuss.elastic.co/u/anhthu)\
**Post date:** [March 27, 2012, 7:56am UTC](https://discuss.elastic.co/t/help-on-searching-solution/7141/3 "2012-03-27T07:56:14Z")

</div>

Hi,

It means "_company_" and "_kompany_"

On Mar 27, 1:54 pm, Thinus Prinsloo [thinus.prins...@gmail.com](mailto:thinus.prins...@gmail.com) wrote:

> Do you literally mean "xx", or is that your way of saying "anything", as in  
> "company\*" and "\*company" etc.?
> 
> On Tuesday, 27 March 2012 08:49:46 UTC+2, Anh Thu wrote:
> 
> > Hi,
> 
> > I have a query string is "company", I expect that search result can  
> > contain one or many below tokens:
> 
> > "company"  
> > "xxcompany"  
> > "companyxx"  
> > "xxcompanyxx"  
> > "kompany"  
> > "xxkompany"  
> > "kompanyxx"  
> > "xxkompanyxx"
> 
> > I've tried using phonetic filter and fuzzy search query\_string but it  
> > did not succeed. Could anyone help me on this, it's really  
> > appreciated.
> 
> > Cheers, Thu

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 28, 2012, 10:23am UTC](https://discuss.elastic.co/t/help-on-searching-solution/7141/4 "2012-03-28T10:23:52Z")

</div>

You have several options here, the first is to use stemming based analyzer  
to perform some stemming on the indexed tokens, or, use ngram based  
analyzer.

On Tue, Mar 27, 2012 at 9:56 AM, Anh Thu [dinhvuanhthu@gmail.com](mailto:dinhvuanhthu@gmail.com) wrote:

> Hi,
> 
> It means "_company_" and "_kompany_"
> 
> On Mar 27, 1:54 pm, Thinus Prinsloo [thinus.prins...@gmail.com](mailto:thinus.prins...@gmail.com) wrote:
> 
> > Do you literally mean "xx", or is that your way of saying "anything", as  
> > in  
> > "company\*" and "\*company" etc.?
> > 
> > On Tuesday, 27 March 2012 08:49:46 UTC+2, Anh Thu wrote:
> > 
> > > Hi,
> > 
> > > I have a query string is "company", I expect that search result can  
> > > contain one or many below tokens:
> > 
> > > "company"  
> > > "xxcompany"  
> > > "companyxx"  
> > > "xxcompanyxx"  
> > > "kompany"  
> > > "xxkompany"  
> > > "kompanyxx"  
> > > "xxkompanyxx"
> > 
> > > I've tried using phonetic filter and fuzzy search query\_string but it  
> > > did not succeed. Could anyone help me on this, it's really  
> > > appreciated.
> > 
> > > Cheers, Thu

---

<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:34am UTC](https://discuss.elastic.co/t/help-on-searching-solution/7141/5 "2017-07-06T03:34:25Z")

</div>


