Hi, May be you have omitTermFreqAndPositions=true set for your fields? Positions are necessary for phrase queries to work.
Ahmet On Monday, December 8, 2014 5:20 PM, Dinesh Babu <dinesh.b...@pb.com> wrote: Hi Yonik, It is a text field ( all our search fields are of type text ). Very unlucky for me that it is not working. Will try the NGram solution provided by Jack. Regards, Dinesh Babu. -----Original Message----- From: ysee...@gmail.com [mailto:ysee...@gmail.com] On Behalf Of Yonik Seeley Sent: 08 December 2014 13:25 To: solr-user@lucene.apache.org Subject: Re: How to stop Solr tokenising search terms with spaces On Mon, Dec 8, 2014 at 2:50 AM, Dinesh Babu <dinesh.b...@pb.com> wrote: > I just tried your suggestion > > {!complexphrase}displayName:"RVN Viewpoint users" > > Even the above did not work. Am I missing any configuration changes for this > parser to work? What is the fieldType of displayName? The complexphrase query parser is only for "text" fields (those that that index each word as a separate term.) -Yonik http://heliosearch.org - native code faceting, facet functions, sub-facets, off-heap data > Regards, > Dinesh Babu. > > > > -----Original Message----- > From: ysee...@gmail.com [mailto:ysee...@gmail.com] On Behalf Of Yonik > Seeley > Sent: 07 December 2014 20:49 > To: solr-user@lucene.apache.org > Subject: Re: How to stop Solr tokenising search terms with spaces > > On Sun, Dec 7, 2014 at 3:18 PM, Dinesh Babu <dinesh.b...@pb.com> wrote: >> Thanks Yonik. This does not seem to work for me. This is wgat I did >> >> 1) q=displayName:rvn* brings me two records (a) "RVN Viewpoint Users" and >> (b) "RVN Project Admins" >> >> 2) {!complexphrase}"RVN*" --> Unknown query type >> \"org.apache.lucene.search.PrefixQuery\" found in phrase query string >> \"RVN*\"" > > Looks like you found a bug in this part... a prefix query being quoted when > it doesn't need to be. > >> 3) {!complexphrase}"RVN V*" -- Does not bring any result back. > > This type of query should work (and does for me). Is it because the default > search field does not have these terms, and you didn't specify a different > field to search? > Try this: > {!complexphrase}displayName:"RVN V*" > > -Yonik > http://heliosearch.org - native code faceting, facet functions, > sub-facets, off-heap data > > ________________________________ > ________________________________