lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raghuveer Kancherla <raghuveer.kanche...@aplopio.com>
Subject Re: parsedquery becomes PhraseQuery
Date Thu, 17 Dec 2009 06:07:15 GMT
Its likely that your analyzer has WordDelimiterFilterFactory (look at your
schema for the field in question).
If a single token is split into more tokens during the analysis phase, solr
will do a phrase query instead of a term query.

In your case disk/1.0 is being analyzed into disk 1 0 (three tokens). Hence
the phrase query.

-Raghu

On Thu, Dec 17, 2009 at 3:40 AM, Jibo John <jibojohn@mac.com> wrote:

> Hello,
>
> I have a question on how solr determines whether the q value needs to be
> analyzed as a regular query or as a phrase query.
>
> Let's say, I have a text    'jibojohn info disk/1.0'
>
> If I query for 'jibojohn info', I get the results. The query is parsed as:
>
>  <str name="rawquerystring">jibojohn info</str>
>  <str name="querystring">jibojohn info</str>
>  <str name="parsedquery">+data:jibojohn +data:info</str>
>  <str name="parsedquery_toString">+data:jibojohn +data:info</str>
>
> However, if I query for 'disk/1.0', I get nothing. The query is parsed as:
>
> <str name="rawquerystring">disk/1.0</str>
>  <str name="querystring">disk/1.0</str>
>  <str name="parsedquery">PhraseQuery(data:"disk 1 0")</str>
>  <str name="parsedquery_toString">data:"disk 1 0"</str>
>
> I was expecting this to be treated as a regular query, instead of a phrase
> query.  I was wondering why.
>
> Appreciate your input.
>
> -Jibo
>
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message