lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien RUFFIE <>
Subject RE: How to do fuzzy search on phrases
Date Wed, 14 Jan 2015 14:19:25 GMT

Can I use ComplexPhraseQueryParser with Core Solr 3.3.0 ?


Bien cordialement,

ルフフィエ アドリエン
Adrien Ruffié
LD : +33 1 73 03 26 40
Tél : +33 1 73 03 29 80

Innover la Relation Client

-----Message d'origine-----
De : Tomoko Uchida [] 
Envoyé : mercredi 14 janvier 2015 14:31
À :
Objet : Re: How to do fuzzy search on phrases


I suspect you are likely to misunderstand fuzzy search.
You should append "~N" to end of each query term, not whole query string /
(You can debug your query and get useful information by specifying
"debugQuery=true" parameter, try it if you have not.)

At first glance, I guess Complex Phrase Query Parser possibly might work
for you... This allows more control over phrase query.

Just for your information, I indexed a document that has two fields, id and
title. title field is tokenized by StandardTokenizer.
- id: 1
- title: mist spa

And I issued two phrase queries to Solr, one uses default parser (Standard
Query Paraser) and other uses Complex Phrase Query Parser.
* Query 1
title:"mysty~ spa"    // not hit
* Query 2
{!complexphrase}title:"mysty~ spa"    // hits

I have no idea about performance impact. (you'll need sufficient
performance test.)


2015-01-14 18:34 GMT+09:00 madhav bahuguna <>:

> HI
> Iam using solr 4.7 and solr php client.
> So heres the issue ,i have data indexed in solr
> eg
> mist spa
> I have applied fuzzy to my search and If i search myst or mysty i get the
> correct result i get mist spa in result.
> But if i write mysty spa or must spa i do not get ant results.Iam not able
> to implement fuzzy search on more than one word.
> Can any one advise me or help me regarding this.
> The query iam passing using solr php client is
> $querynew="(business_name:$data~N)";
> --
> Regards
> Madhav Bahuguna
View raw message