Thanks Erik
Regards,
Dinesh Babu.


-----Original Message-----
From: Erik Hatcher [mailto:erik.hatc...@gmail.com]
Sent: 08 December 2014 17:02
To: solr-user@lucene.apache.org
Subject: Re: How to stop Solr tokenising search terms with spaces

debug output tells a lot.  Looks like in the last two examples that the second 
part (Viewpoint*) is NOT parsed with the complex phrase parser - the whitespace 
thwarts it.

I’d recommend doing something like this to test that parser out to avoid the 
“meta” parsing issue.

    q={!complexphrase v=$qq}&qq=<the expression>

        Erik




> On Dec 8, 2014, at 11:14 AM, Dinesh Babu <dinesh.b...@pb.com> wrote:
>
> Hi Erik,
>
> 1. With search phrase in quotes
> {!complexphrase}displayName:"RVN Viewpoint*"
>
> "debug": {
>    "rawquerystring": "{!complexphrase}displayName:\"RVN Viewpoint*\"",
>    "querystring": "{!complexphrase}displayName:\"RVN Viewpoint*\"",
>    "parsedquery": "ComplexPhraseQuery(\"RVN Viewpoint*\")",
>    "parsedquery_toString": "\"RVN Viewpoint*\"",
>    "QParser": "ComplexPhraseQParser"
>  }
>
> 2. Tried with search phrase not in quotes: This brings result back but only 
> those starting with "viewpoint" and does not bring  "rvn viewpoint"
>
> {!complexphrase}displayName:RVN Viewpoint*
>
> "debug": {
>    "rawquerystring": "{!complexphrase}displayName:RVN Viewpoint*",
>    "querystring": "{!complexphrase}displayName:RVN Viewpoint*",
>    "parsedquery": "displayName:rvn displayName:viewpoint*",
>    "parsedquery_toString": "displayName:rvn displayName:viewpoint*",
>    "QParser": "ComplexPhraseQParser"
>  }
>
> 3. {!complexphrase}displayName:RVN* Viewpoint*
>
> "debug": {
>    "rawquerystring": "{!complexphrase}displayName:RVN* Viewpoint*",
>    "querystring": "{!complexphrase}displayName:RVN* Viewpoint*",
>    "parsedquery": "displayName:rvn* displayName:viewpoint*",
>    "parsedquery_toString": "displayName:rvn* displayName:viewpoint*",
>    "QParser": "ComplexPhraseQParser"
>  }
>
> Regards,
> Dinesh Babu.
>
> -----Original Message-----
> From: Erik Hatcher [mailto:erik.hatc...@gmail.com]
> Sent: 08 December 2014 09:40
> To: solr-user@lucene.apache.org
> Subject: Re: How to stop Solr tokenising search terms with spaces
>
> What's the parsed query?  &debug=true
>
>
>> On Dec 8, 2014, at 02:50, 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?
>>
>> 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
>>
>> ________________________________
>>
>
> ________________________________
>


________________________________

Reply via email to