You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by subacini Arunkumar <su...@gmail.com> on 2013/11/11 06:12:23 UTC

Solr 3.5 and 4.4 - ParsedQuery is different for q=*

Hi Team,


We are upgrading from Solr 3.5 to Solr 4.4. The response from 3.5 and 4.4
are different. I have attached request and response [highlighted the major
difference in RED]


Can you please let me know how to change "parsedQuery" from *MatchAllDocsQuery
to text.*


*Also, in solr 4.4 if fq or q param has * , we are having this issue.
Otheriwse parsedQuery value is text:<searchStr>*


*Solr 4.4 Request:*


http://<server>:7982/nip/select/?q=*&fq=MODULE_ID%3A**\**&debug=true


*Solr 4.4 Repsonse:*

<response>

<lst name="responseHeader">

<int name="status">0</int>

<int name="QTime">59</int>

</lst>

<result name="response" *numFound="0"* start="0"/>

<lst name="debug">

<str name="rawquerystring">*</str>

<str name="querystring">*</str>

<str name="parsedquery">*MatchAllDocsQuery(*:**)</str>

<str name="parsedquery_toString">**:**</str>

<lst name="explain"/>

<str name="QParser">LuceneQParser</str>

<arr name="filter_queries">

<str>MODULE_ID:**\**</str>

</arr>

<arr name="parsed_filter_queries">

<str>MODULE_ID*:**\**<*/str>

</arr>

<lst name="timing">...</lst>

</lst>

</response>


*Solr 3.5 Request*


http://<server>:7982/nip/select/?q=*&fq=MODULE_ID%3A**\**&debugQuery=true


*Solr 3.5 Response*

<response>

<lst name="responseHeader">

<int name="status">0</int>

<int name="QTime">1458</int>

</lst>

<result name="response" numFound=*"146928*" start="0">

<doc>...</doc>

<doc>...</doc>

<doc>...</doc>

<doc>...</doc>

<doc>...</doc>

<doc>...</doc>

<doc>...</doc>

<doc>...</doc>

<doc>...</doc>

<doc>...</doc>

</result>

<lst name="debug">

<str name="rawquerystring">*</str>

<str name="querystring">*</str>

<str name="parsedquery">*text:**</str>

<str name="parsedquery_toString">*text:**</str>

<lst name="explain">...</lst>

<str name="QParser">LuceneQParser</str>

<arr name="filter_queries">

<str>MODULE_ID:**\**</str>

</arr>

<arr name="parsed_filter_queries">

<str>MODULE_ID:****</str>

</arr>

<lst name="timing">...</lst>

</lst>

</response>



Thanks,

Subacini

Re: Solr 3.5 and 4.4 - ParsedQuery is different for q=*

Posted by Shawn Heisey <so...@elyograg.org>.
On 11/10/2013 10:12 PM, subacini Arunkumar wrote:
> We are upgrading from Solr 3.5 to Solr 4.4. The response from 3.5 and 4.4
> are different. I have attached request and response [highlighted the major
> difference in RED]
> 
> 
> Can you please let me know how to change "parsedQuery" from *MatchAllDocsQuery
> to text.*
> 
> 
> *Also, in solr 4.4 if fq or q param has * , we are having this issue.
> Otheriwse parsedQuery value is text:<searchStr>*

Your attachment never made it through, because most attachments cannot
be sent to the mailing list.  Nothing was colored red -- the list
doesn't really do HTML email.

I can't tell if you're using * for emphasis or whether all asterisks
were literally there.  I'm going to assume that you aren't trying to
emphasize things.  Apologies if I'm wrong.

I can tell you that q=* is not really a valid query for any version of
Solr.  If you meant all documents with the standard query parser, use
q=*:*, which is a special shortcut for all documents.  If you meant all
documents with the dismax or edismax query parster, then set q.alt to
*:* and either pass an empty q value, or don't include q at all.

I'm really confused about what your filter query is supposed to
accomplish.  Four asterisks, one of which is escaped?  I have no idea
what that is supposed to do.

To go much further, we'll need to know what you are trying to
accomplish.  We will also need to see the config of your /select handler
on both versions, the field name(s) that you are trying to search, as
well as info from schema.xml about the field(s) and any related
fieldType settings.

Thanks,
Shawn