If possible, please post your field type for others to see the final solution. Thanks!

-- Jack Krupansky

-----Original Message----- From: Dinesh Babu
Sent: Wednesday, December 10, 2014 9:54 AM
To: [email protected] ; Ahmet Arslan
Subject: RE: How to stop Solr tokenising search terms with spaces

Hi Ahmet,

We have gone for the Ngram solution. Thanks

Regards,
Dinesh Babu.

-----Original Message-----
From: Ahmet Arslan [mailto:[email protected]]
Sent: 08 December 2014 15:27
To: [email protected]
Subject: Re: How to stop Solr tokenising search terms with spaces

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 <[email protected]> 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: [email protected] [mailto:[email protected]] On Behalf Of Yonik Seeley
Sent: 08 December 2014 13:25
To: [email protected]
Subject: Re: How to stop Solr tokenising search terms with spaces

On Mon, Dec 8, 2014 at 2:50 AM, Dinesh Babu <[email protected]> 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: [email protected] [mailto:[email protected]] On Behalf Of Yonik
Seeley
Sent: 07 December 2014 20:49
To: [email protected]
Subject: Re: How to stop Solr tokenising search terms with spaces

On Sun, Dec 7, 2014 at 3:18 PM, Dinesh Babu <[email protected]> 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

________________________________


________________________________

________________________________

Reply via email to