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 mechravi25 <me...@yahoo.co.in> on 2012/02/22 13:47:07 UTC

String search in Dismax handler

Hi,

The string I am searching is "Pass By Value".  I am using the qt=dismax (in
the request query) as well.


When I search the above string with the double quotes, the data is getting
fetched 
but the same query string without any double quotes gives no results.

Following is the dismax request handler in the solrconfig.xml


<requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
    <lst name="defaults">
     <str name="echoParams">explicit</str>
     
     <str name="fl">
        id,score
     </str>
    
     <str name="q.alt">*:*</str>
    
     
     <str name="f.name.hl.fragsize">0</str>
     
     <str name="f.name.hl.alternateField">name</str>
     <str name="f.text.hl.fragmenter">regex</str> 
    </lst>
  </requestHandler>



The same query string works fine with and without double quotes when I use
default request handler


Following is the default request handler in the solrconfig.xml

<requestHandler name="standard" class="solr.StandardRequestHandler"
default="true">
    
     <lst name="defaults">
       <str name="echoParams">explicit</str>
       
     </lst>
  </requestHandler>


Please provide some suggestions as to why the string search without quotes
is returning no records 
when dismax handler is used. Am I missing out on something?

Thanks.

--
View this message in context: http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3766360.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: String search in Dismax handler

Posted by Erick Erickson <er...@gmail.com>.
Watch out for StringField, that may be where you're having
trouble. Take a close look at your admin/analysis page. If
"Pass by Value" is matching on a string field when quoted,
that'll explain why it isn't matching when not quoted.

The problem here is that the query parser (before it gets to
the field analysis chain) breaks up unquoted input into separate
tokens, so you have three tokens "Pass" "by" "Value". But
StringField does NOT analyze input in any way. So your index
contains a *single* token "Pass by Value" in StringFields
and querying for "Pass" "by" "Value" will NOT match. as it's
looking for three tokens and you only have one indexed.

StringField doesn't change capitalization either. It's almost always
used for machine-generated strings so you don't have this
problem. In fact there's some discussion for deprecating it
since it seems to cause no end of confusion. If you want
something similar that allows you to, for instance, be
case insensitive, consider an analysis chain of
KeywordTokenizer and LowercaseFilter, and, perhaps,
TrimFilter.

Best
Erick

On Fri, Feb 24, 2012 at 9:08 AM, mechravi25 <me...@yahoo.co.in> wrote:
> Hi,
>
> I had posted two different query strings by mistake. PFB the correct strings
> when "Pass by value" is the search word
>
> String given without quotes
>
> webapp=/solr path=/select/
> params={facet=true&f.typeFacet.facet.mincount=1&qf=name^2.3+text+x_name^0.3+id^0.3+xid^0.3&hl.fl=*&hl=true&f.rFacet.facet.mincount=1&rows=10&fl=*&start=0&q=pass+by+value&facet.field=typeFacet&facet.field=rFacet&qt=dismax}
> hits=0 status=0 QTime=63
>
> and the parsed query for the same is as follows
>
> <str name="parsedquery">+((DisjunctionMaxQuery((xid:pass^0.3 | id:pass^0.3 |
> x_name:pass^0.3 | text:pass | name:pass^2.3))
> DisjunctionMaxQuery((xid:by^0.3 | id:by^0.3))
> DisjunctionMaxQuery((xid:value^0.3 | id:value^0.3 | x_name:value^0.3 |
> text:value | name:value^2.3)))~3) ()</str>
> <str name="parsedquery_toString">+(((xid:pass^0.3 | id:pass^0.3 |
> x_name:pass^0.3 | text:pass | name:pass^2.3) (xid:by^0.3 | id:by^0.3)
> (xid:value^0.3 | id:value^0.3 | x_name:value^0.3 | text:value |
> name:value^2.3))~3) ()</str>
>
> String given with quotes
>
> webapp=/solr path=/select/
> params={facet=true&qf=name^2.3+text+x_name^0.3+id^0.3+xid^0.3&f.typeFacet.facet.mincount=1&hl.fl=*&f.rFacet.facet.mincount=1&hl=true&rows=10&fl=*&start=0&q="pass+by+value"&facet.field=typeFacet&facet.field=rFacet&qt=dismax}
> hits=4 status=0 QTime=411
>
> and its parsed query is
>
> <str name="parsedquery">+DisjunctionMaxQuery((xid:pass by value^0.3 |
> id:pass by value^0.3 | x_name:"pass ? value"^0.3 | text:"pass ? value" |
> name:"pass ? value"^2.3)) ()</str>
>
> <str name="parsedquery_toString">+(xid:pass by value^0.3 | id:pass by
> value^0.3 | x_name:"pass ? value"^0.3 | text:"pass ? value" | name:"pass ?
> value"^2.3) ()</str>
>
> and also I am using diffrent field type for id and xid and it uses
> "solr.StrField" as its class so, we have not used the solr.StopFilterFactory
> for it. the field type is as follows
>
> <fieldtype name="string" class="solr.StrField" sortMissingLast="true"
> omitNorms="true"/>
>
> But, I have used a different field type for name, text and x_name and this
> field type uses "solr.TextField" as its class and has the
> solr.StopFilterFactory as one of its filter. It is as follows
>
> <fieldType name="textgen" class="solr.TextField" positionIncrementGap="100">
> <analyzer type="index">
> <tokenizer class="solr.WhitespaceTokenizerFactory"/>
> <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" enablePositionIncrements="true" />
> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
> generateintegerParts="1" catenateWords="1" catenateintegers="1"
> catenateAll="1" splitOnCaseChange="1" splitOnNumerics="1"
> stemEnglishPossessive="1" />
> <filter class="solr.LowerCaseFilterFactory"/>
> <filter class="solr.PhoneticFilterFactory" encoder="Soundex" inject="true"/>
> </analyzer>
> <analyzer type="query">
> <tokenizer class="solr.WhitespaceTokenizerFactory"/>
> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
> <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" enablePositionIncrements="true"/>
> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
> generateintegerParts="1" catenateWords="0" catenateintegers="0"
> catenateAll="0" splitOnCaseChange="0"/>
> <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
> </fieldType>
>
>
> Please guide me. Thanks.
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3772648.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: String search in Dismax handler

Posted by mechravi25 <me...@yahoo.co.in>.
Hi,

I had posted two different query strings by mistake. PFB the correct strings
when "Pass by value" is the search word
 
String given without quotes

webapp=/solr path=/select/
params={facet=true&f.typeFacet.facet.mincount=1&qf=name^2.3+text+x_name^0.3+id^0.3+xid^0.3&hl.fl=*&hl=true&f.rFacet.facet.mincount=1&rows=10&fl=*&start=0&q=pass+by+value&facet.field=typeFacet&facet.field=rFacet&qt=dismax}
hits=0 status=0 QTime=63
 
and the parsed query for the same is as follows
 
<str name="parsedquery">+((DisjunctionMaxQuery((xid:pass^0.3 | id:pass^0.3 |
x_name:pass^0.3 | text:pass | name:pass^2.3))
DisjunctionMaxQuery((xid:by^0.3 | id:by^0.3))
DisjunctionMaxQuery((xid:value^0.3 | id:value^0.3 | x_name:value^0.3 |
text:value | name:value^2.3)))~3) ()</str>  
<str name="parsedquery_toString">+(((xid:pass^0.3 | id:pass^0.3 |
x_name:pass^0.3 | text:pass | name:pass^2.3) (xid:by^0.3 | id:by^0.3)
(xid:value^0.3 | id:value^0.3 | x_name:value^0.3 | text:value |
name:value^2.3))~3) ()</str>  

String given with quotes

webapp=/solr path=/select/
params={facet=true&qf=name^2.3+text+x_name^0.3+id^0.3+xid^0.3&f.typeFacet.facet.mincount=1&hl.fl=*&f.rFacet.facet.mincount=1&hl=true&rows=10&fl=*&start=0&q="pass+by+value"&facet.field=typeFacet&facet.field=rFacet&qt=dismax}
hits=4 status=0 QTime=411 
 
and its parsed query is
 
<str name="parsedquery">+DisjunctionMaxQuery((xid:pass by value^0.3 |
id:pass by value^0.3 | x_name:"pass ? value"^0.3 | text:"pass ? value" |
name:"pass ? value"^2.3)) ()</str> 
 
<str name="parsedquery_toString">+(xid:pass by value^0.3 | id:pass by
value^0.3 | x_name:"pass ? value"^0.3 | text:"pass ? value" | name:"pass ?
value"^2.3) ()</str>  

and also I am using diffrent field type for id and xid and it uses
"solr.StrField" as its class so, we have not used the solr.StopFilterFactory
for it. the field type is as follows
 
<fieldtype name="string" class="solr.StrField" sortMissingLast="true"
omitNorms="true"/>
 
But, I have used a different field type for name, text and x_name and this
field type uses "solr.TextField" as its class and has the
solr.StopFilterFactory as one of its filter. It is as follows
 
<fieldType name="textgen" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index"> 
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateintegerParts="1" catenateWords="1" catenateintegers="1"
catenateAll="1" splitOnCaseChange="1" splitOnNumerics="1"
stemEnglishPossessive="1" />
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.PhoneticFilterFactory" encoder="Soundex" inject="true"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateintegerParts="1" catenateWords="0" catenateintegers="0"
catenateAll="0" splitOnCaseChange="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>


Please guide me. Thanks.


--
View this message in context: http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3772648.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: String search in Dismax handler

Posted by Erick Erickson <er...@gmail.com>.
OK, I really don't get this. The quoted bit gives:
+DisjunctionMaxQuery((xid:pass by value^0.3 | id:pass by value^0.3 |
x_name:"pass ? value"^0.3 | text:"pass ? value" | name:"pass ?
value"^2.3))

The bare bit gives:
+((DisjunctionMaxQuery((uxid:pass^0.3 | id:pass^0.3 | x_name:pass^0.3
| text:loan | name:pass^2.3))
DisjunctionMaxQuery((uxid:by^0.3 | id:by^0.3))
DisjunctionMaxQuery((uxid:value^0.3 | id:value^0.3 | x_name:value^0.3 |
text:value | name:value^2.3)))~3

In the one case you're searching on "xid", in the other "uxid". The
unquoted case also has "text:loan" and "id:by" and "id:value". Is that
that's where you are getting your hits?

Erick

On Thu, Feb 23, 2012 at 6:52 AM, mechravi25 <me...@yahoo.co.in> wrote:
> HI Erick,
>
> Thanks for the response.
>
> I am currently using solr 1.5 version.
>
> We are getting the following query when we give the search query as "Pass By
> Value" without quotes and by using qt=dismax in the request query.
>
>  webapp=/solr path=/select/
> params={facet=true&f.typeFacet.facet.mincount=1&qf=name^2.3+text+x_name^0.3+id^0.3+uxid^0.3&hl.fl=*&hl=true&f.rFacet.facet.mincount=1&rows=10&debugQuery=true&fl=*&start=0&q=pass+by+value&facet.field=typeFacet&facet.field=rFacet&qt=dismax}
> hits=0 status=0 QTime=63
>
> and the response for it in the UI is as follows
>
> <result name="response" numFound="0" start="0" />
> - <lst name="facet_counts">
>  <lst name="facet_queries" />
> - <lst name="facet_fields">
>  <lst name="typeFacet" />
>  <lst name="rFacet" />
>  </lst>
>  <lst name="facet_dates" />
>  </lst>
>  <lst name="highlighting" />
> - <lst name="debug">
>  <str name="rawquerystring">pass by value</str>
>  <str name="querystring">pass by value</str>
>  <str name="parsedquery">+((DisjunctionMaxQuery((uxid:pass^0.3 |
> id:pass^0.3 | x_name:pass^0.3 | text:loan | name:pass^2.3))
> DisjunctionMaxQuery((uxid:by^0.3 | id:by^0.3))
> DisjunctionMaxQuery((uxid:value^0.3 | id:value^0.3 | x_name:value^0.3 |
> text:value | name:value^2.3)))~3) ()</str>
>  <str name="parsedquery_toString">+(((uxid:pass^0.3 | id:loan^0.3 |
> x_name:pass^0.3 | text:loan | name:pass^2.3) (uxid:by^0.3 | id:by^0.3)
> (uxid:value^0.3 | id:value^0.3 | x_name:value^0.3 | text:value |
> name:value^2.3))~3) ()</str>
>  <lst name="explain" />
>  <str name="QParser">DisMaxQParser</str>
>  <null name="altquerystring" />
>  <null name="boostfuncs" />
> - <lst name="timing">
>  <double name="time">3.0</double>
> - <lst name="prepare">
>  <double name="time">1.0</double>
> - <lst name="org.apache.solr.handler.component.QueryComponent">
>  <double name="time">1.0</double>
>  </lst>
> - <lst name="org.apache.solr.handler.component.FacetComponent">
>  <double name="time">0.0</double>
>  </lst>
> - <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
>  <double name="time">0.0</double>
>  </lst>
> - <lst name="org.apache.solr.handler.component.HighlightComponent">
>  <double name="time">0.0</double>
>  </lst>
> - <lst name="org.apache.solr.handler.component.StatsComponent">
>  <double name="time">0.0</double>
>  </lst>
> - <lst name="org.apache.solr.handler.component.DebugComponent">
>  <double name="time">0.0</double>
>  </lst>
>  </lst>
> - <lst name="process">
>  <double name="time">2.0</double>
> - <lst name="org.apache.solr.handler.component.QueryComponent">
>  <double name="time">1.0</double>
>  </lst>
> - <lst name="org.apache.solr.handler.component.FacetComponent">
>  <double name="time">0.0</double>
>  </lst>
> - <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
>  <double name="time">0.0</double>
>  </lst>
> - <lst name="org.apache.solr.handler.component.HighlightComponent">
>  <double name="time">1.0</double>
>  </lst>
> - <lst name="org.apache.solr.handler.component.StatsComponent">
>  <double name="time">0.0</double>
>  </lst>
> - <lst name="org.apache.solr.handler.component.DebugComponent">
>  <double name="time">0.0</double>
>  </lst>
>  </lst>
>  </lst>
>  </lst>
>  </response>
>
> whereas we get the following query when we remove the parameter "qt=dismax"
> from the request query and this is fetching the required results.
>
> webapp=/solr path=/select/
> params={facet=true&qf=name^2.3+text+x_name^0.3+id^0.3+uxid^0.3&f.typeFacet.facet.mincount=1&hl.fl=*&f.rFacet.facet.mincount=1&hl=true&rows=10&fl=*&debugQuery=true&start=0&q=pass+by+value&facet.field=typeFacet&facet.field=rFacet}
> hits=9203 status=0 QTime=1158
>
> In another case where we use "Pass by Value" with quotes and also with
> qt=dismax in the request handler, the search query is fetching the right
> values. The following is the concerned query.
>
>  webapp=/solr path=/select/
> params={facet=true&qf=name^2.3+text+x_name^0.3+id^0.3+uxid^0.3&f.typeFacet.facet.mincount=1&hl.fl=*&f.rFacet.facet.mincount=1&hl=true&rows=10&fl=*&debugQuery=true&start=0&q="pass+by+value"&facet.field=typeFacet&facet.field=rFacet}
> hits=18 status=0 QTime=213
>
>
>
>  and the response for it from UI is
>
>  <?xml version="1.0" encoding="UTF-8" ?>
>  - <response>
>  - <lst name="responseHeader">
>   <int name="status">0</int>
>   <int name="QTime">578</int>
>  - <lst name="params">
>   <str name="facet">true</str>
>   <str name="f.typeFacet.facet.mincount">1</str>
>   <str name="qf">name^2.3 text x_name^0.3 id^0.3 xid^0.3</str>
>   <str name="hl.fl">*</str>
>   <str name="hl">true</str>
>   <str name="f.rFacet.facet.mincount">1</str>
>   <str name="rows">10</str>
>   <str name="debugQuery">true</str>
>   <str name="fl">*</str>
>   <str name="start">0</str>
>   <str name="q">"pass by value"</str>
>  - <arr name="facet.field">
>   <str>typeFacet</str>
>   <str>rFacet</str>
>   </arr>
>   <str name="qt">dismax</str>
>   </lst>
>   </lst>
>  + <result name="response" numFound="18" start="0">
>  + <lst name="facet_counts">
>  + <lst name="highlighting">
>  - <lst name="debug">
>   <str name="rawquerystring">"pass by value"</str>
>   <str name="querystring">"pass by value"</str>
>   <str name="parsedquery">+DisjunctionMaxQuery((xid:pass by value^0.3 |
> id:pass by value^0.3 | x_name:"pass ? value"^0.3 | text:"pass ? value" |
> name:"pass ? value"^2.3)) ()</str>
>   <str name="parsedquery_toString">+(xid:pass by value^0.3 | id:pass by
> value^0.3 | x_name:"pass ? value"^0.3 | text:"pass ? value" | name:"pass ?
> value"^2.3) ()</str>
>  + <lst name="explain">
>   <str name="QParser">DisMaxQParser</str>
>   <null name="altquerystring" />
>   <null name="boostfuncs" />
>  - <lst name="timing">
>   <double name="time">578.0</double>
>  - <lst name="prepare">
>   <double name="time">1.0</double>
>  - <lst name="org.apache.solr.handler.component.QueryComponent">
>   <double name="time">1.0</double>
>   </lst>
>  - <lst name="org.apache.solr.handler.component.FacetComponent">
>   <double name="time">0.0</double>
>   </lst>
>  - <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
>   <double name="time">0.0</double>
>   </lst>
>  - <lst name="org.apache.solr.handler.component.HighlightComponent">
>   <double name="time">0.0</double>
>   </lst>
>  - <lst name="org.apache.solr.handler.component.StatsComponent">
>   <double name="time">0.0</double>
>   </lst>
>  - <lst name="org.apache.solr.handler.component.DebugComponent">
>   <double name="time">0.0</double>
>   </lst>
>   </lst>
>  - <lst name="process">
>   <double name="time">577.0</double>
>  - <lst name="org.apache.solr.handler.component.QueryComponent">
>   <double name="time">373.0</double>
>   </lst>
>  - <lst name="org.apache.solr.handler.component.FacetComponent">
>   <double name="time">0.0</double>
>   </lst>
>  - <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
>   <double name="time">0.0</double>
>   </lst>
>  - <lst name="org.apache.solr.handler.component.HighlightComponent">
>   <double name="time">136.0</double>
>   </lst>
>  - <lst name="org.apache.solr.handler.component.StatsComponent">
>   <double name="time">0.0</double>
>   </lst>
>  - <lst name="org.apache.solr.handler.component.DebugComponent">
>   <double name="time">68.0</double>
>   </lst>
>   </lst>
>   </lst>
>   </lst>
>   </response>
>
>
> we also tried by using the following tag, <str name="qf">text</str>
> to make the dismax handler point to the default field type in the schema.xml
> and this is also not working.
> Am I missing something here? Please guide me
>
> Thanks
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3769450.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: String search in Dismax handler

Posted by mechravi25 <me...@yahoo.co.in>.
HI Erick,

Thanks for the response.

I am currently using solr 1.5 version.

We are getting the following query when we give the search query as "Pass By
Value" without quotes and by using qt=dismax in the request query.
 
 webapp=/solr path=/select/
params={facet=true&f.typeFacet.facet.mincount=1&qf=name^2.3+text+x_name^0.3+id^0.3+uxid^0.3&hl.fl=*&hl=true&f.rFacet.facet.mincount=1&rows=10&debugQuery=true&fl=*&start=0&q=pass+by+value&facet.field=typeFacet&facet.field=rFacet&qt=dismax}
hits=0 status=0 QTime=63
 
and the response for it in the UI is as follows
 
<result name="response" numFound="0" start="0" /> 
- <lst name="facet_counts">
  <lst name="facet_queries" /> 
- <lst name="facet_fields">
  <lst name="typeFacet" /> 
  <lst name="rFacet" /> 
  </lst>
  <lst name="facet_dates" /> 
  </lst>
  <lst name="highlighting" /> 
- <lst name="debug">
  <str name="rawquerystring">pass by value</str> 
  <str name="querystring">pass by value</str> 
  <str name="parsedquery">+((DisjunctionMaxQuery((uxid:pass^0.3 |
id:pass^0.3 | x_name:pass^0.3 | text:loan | name:pass^2.3))
DisjunctionMaxQuery((uxid:by^0.3 | id:by^0.3))
DisjunctionMaxQuery((uxid:value^0.3 | id:value^0.3 | x_name:value^0.3 |
text:value | name:value^2.3)))~3) ()</str> 
  <str name="parsedquery_toString">+(((uxid:pass^0.3 | id:loan^0.3 |
x_name:pass^0.3 | text:loan | name:pass^2.3) (uxid:by^0.3 | id:by^0.3)
(uxid:value^0.3 | id:value^0.3 | x_name:value^0.3 | text:value |
name:value^2.3))~3) ()</str> 
  <lst name="explain" /> 
  <str name="QParser">DisMaxQParser</str> 
  <null name="altquerystring" /> 
  <null name="boostfuncs" /> 
- <lst name="timing">
  <double name="time">3.0</double> 
- <lst name="prepare">
  <double name="time">1.0</double> 
- <lst name="org.apache.solr.handler.component.QueryComponent">
  <double name="time">1.0</double> 
  </lst>
- <lst name="org.apache.solr.handler.component.FacetComponent">
  <double name="time">0.0</double> 
  </lst>
- <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
  <double name="time">0.0</double> 
  </lst>
- <lst name="org.apache.solr.handler.component.HighlightComponent">
  <double name="time">0.0</double> 
  </lst>
- <lst name="org.apache.solr.handler.component.StatsComponent">
  <double name="time">0.0</double> 
  </lst>
- <lst name="org.apache.solr.handler.component.DebugComponent">
  <double name="time">0.0</double> 
  </lst>
  </lst>
- <lst name="process">
  <double name="time">2.0</double> 
- <lst name="org.apache.solr.handler.component.QueryComponent">
  <double name="time">1.0</double> 
  </lst>
- <lst name="org.apache.solr.handler.component.FacetComponent">
  <double name="time">0.0</double> 
  </lst>
- <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
  <double name="time">0.0</double> 
  </lst>
- <lst name="org.apache.solr.handler.component.HighlightComponent">
  <double name="time">1.0</double> 
  </lst>
- <lst name="org.apache.solr.handler.component.StatsComponent">
  <double name="time">0.0</double> 
  </lst>
- <lst name="org.apache.solr.handler.component.DebugComponent">
  <double name="time">0.0</double> 
  </lst>
  </lst>
  </lst>
  </lst>
  </response>
 
whereas we get the following query when we remove the parameter "qt=dismax"
from the request query and this is fetching the required results.
 
webapp=/solr path=/select/
params={facet=true&qf=name^2.3+text+x_name^0.3+id^0.3+uxid^0.3&f.typeFacet.facet.mincount=1&hl.fl=*&f.rFacet.facet.mincount=1&hl=true&rows=10&fl=*&debugQuery=true&start=0&q=pass+by+value&facet.field=typeFacet&facet.field=rFacet}
hits=9203 status=0 QTime=1158

In another case where we use "Pass by Value" with quotes and also with
qt=dismax in the request handler, the search query is fetching the right
values. The following is the concerned query.
 
 webapp=/solr path=/select/
params={facet=true&qf=name^2.3+text+x_name^0.3+id^0.3+uxid^0.3&f.typeFacet.facet.mincount=1&hl.fl=*&f.rFacet.facet.mincount=1&hl=true&rows=10&fl=*&debugQuery=true&start=0&q="pass+by+value"&facet.field=typeFacet&facet.field=rFacet}
hits=18 status=0 QTime=213 
 
 
 
 and the response for it from UI is
 
 <?xml version="1.0" encoding="UTF-8" ?> 
 - <response>
 - <lst name="responseHeader">
   <int name="status">0</int> 
   <int name="QTime">578</int> 
 - <lst name="params">
   <str name="facet">true</str> 
   <str name="f.typeFacet.facet.mincount">1</str> 
   <str name="qf">name^2.3 text x_name^0.3 id^0.3 xid^0.3</str> 
   <str name="hl.fl">*</str> 
   <str name="hl">true</str> 
   <str name="f.rFacet.facet.mincount">1</str> 
   <str name="rows">10</str> 
   <str name="debugQuery">true</str> 
   <str name="fl">*</str> 
   <str name="start">0</str> 
   <str name="q">"pass by value"</str> 
 - <arr name="facet.field">
   <str>typeFacet</str> 
   <str>rFacet</str> 
   </arr>
   <str name="qt">dismax</str> 
   </lst>
   </lst>
 + <result name="response" numFound="18" start="0">
 + <lst name="facet_counts">
 + <lst name="highlighting">
 - <lst name="debug">
   <str name="rawquerystring">"pass by value"</str> 
   <str name="querystring">"pass by value"</str> 
   <str name="parsedquery">+DisjunctionMaxQuery((xid:pass by value^0.3 |
id:pass by value^0.3 | x_name:"pass ? value"^0.3 | text:"pass ? value" |
name:"pass ? value"^2.3)) ()</str> 
   <str name="parsedquery_toString">+(xid:pass by value^0.3 | id:pass by
value^0.3 | x_name:"pass ? value"^0.3 | text:"pass ? value" | name:"pass ?
value"^2.3) ()</str> 
 + <lst name="explain">
   <str name="QParser">DisMaxQParser</str> 
   <null name="altquerystring" /> 
   <null name="boostfuncs" /> 
 - <lst name="timing">
   <double name="time">578.0</double> 
 - <lst name="prepare">
   <double name="time">1.0</double> 
 - <lst name="org.apache.solr.handler.component.QueryComponent">
   <double name="time">1.0</double> 
   </lst>
 - <lst name="org.apache.solr.handler.component.FacetComponent">
   <double name="time">0.0</double> 
   </lst>
 - <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
   <double name="time">0.0</double> 
   </lst>
 - <lst name="org.apache.solr.handler.component.HighlightComponent">
   <double name="time">0.0</double> 
   </lst>
 - <lst name="org.apache.solr.handler.component.StatsComponent">
   <double name="time">0.0</double> 
   </lst>
 - <lst name="org.apache.solr.handler.component.DebugComponent">
   <double name="time">0.0</double> 
   </lst>
   </lst>
 - <lst name="process">
   <double name="time">577.0</double> 
 - <lst name="org.apache.solr.handler.component.QueryComponent">
   <double name="time">373.0</double> 
   </lst>
 - <lst name="org.apache.solr.handler.component.FacetComponent">
   <double name="time">0.0</double> 
   </lst>
 - <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
   <double name="time">0.0</double> 
   </lst>
 - <lst name="org.apache.solr.handler.component.HighlightComponent">
   <double name="time">136.0</double> 
   </lst>
 - <lst name="org.apache.solr.handler.component.StatsComponent">
   <double name="time">0.0</double> 
   </lst>
 - <lst name="org.apache.solr.handler.component.DebugComponent">
   <double name="time">68.0</double> 
   </lst>
   </lst>
   </lst>
   </lst>
   </response>


we also tried by using the following tag, <str name="qf">text</str> 
to make the dismax handler point to the default field type in the schema.xml 
and this is also not working. 
Am I missing something here? Please guide me

Thanks


--
View this message in context: http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3769450.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: String search in Dismax handler

Posted by Erick Erickson <er...@gmail.com>.
Two things:
1> what version of Solr are you using? qt=dismax isn't going to any request
handler I don't think.

2> what do you get when you add &debugQuery=on? Try that with
both results and perhaps that will shed some light. If not, can you
post the results?

Best
Erick

On Wed, Feb 22, 2012 at 7:47 AM, mechravi25 <me...@yahoo.co.in> wrote:
> Hi,
>
> The string I am searching is "Pass By Value".  I am using the qt=dismax (in
> the request query) as well.
>
>
> When I search the above string with the double quotes, the data is getting
> fetched
> but the same query string without any double quotes gives no results.
>
> Following is the dismax request handler in the solrconfig.xml
>
>
> <requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
>    <lst name="defaults">
>     <str name="echoParams">explicit</str>
>
>     <str name="fl">
>        id,score
>     </str>
>
>     <str name="q.alt">*:*</str>
>
>
>     <str name="f.name.hl.fragsize">0</str>
>
>     <str name="f.name.hl.alternateField">name</str>
>     <str name="f.text.hl.fragmenter">regex</str>
>    </lst>
>  </requestHandler>
>
>
>
> The same query string works fine with and without double quotes when I use
> default request handler
>
>
> Following is the default request handler in the solrconfig.xml
>
> <requestHandler name="standard" class="solr.StandardRequestHandler"
> default="true">
>
>     <lst name="defaults">
>       <str name="echoParams">explicit</str>
>
>     </lst>
>  </requestHandler>
>
>
> Please provide some suggestions as to why the string search without quotes
> is returning no records
> when dismax handler is used. Am I missing out on something?
>
> Thanks.
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/String-search-in-Dismax-handler-tp3766360p3766360.html
> Sent from the Solr - User mailing list archive at Nabble.com.