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 Viresh Modi <vi...@highq.com> on 2014/01/22 13:29:33 UTC
dismax request handler will give wrong result in solr 4.3
When i use dismax query type handler in *SOLR 1.4 *and then same for *SOLR
4.3 *then both give different numFound record both have same index profile
as well.
means Solr 1.4 gives 9 records
and Solr 4.3 gives 99 records.
*My Query is:*
start=0&rows=10&hl=true&hl.fl=content&qt=dismax
&q=system admin
&fl=id,application,timestamp,name,score,metaData,metaDataDate
&fq=application:PunitR3_8
&fq= NOT ( id:OnlineR3_8_page_410_0 OR id:OnlineR3_8_page_411_0 OR
id:OnlineR3_8_page_628_0 )
&fq=(metaData:channelId/100 OR metaData:channelId/10 OR
metaData:channelId/160 OR metaData:channelId/12)&sort=score desc
*and In Solr Config.xml has handler::*
<requestHandler name="dismax" class="solr.SearchHandler" default="true">
<lst name="defaults">
<str name="defType">dismax</str>
<str name="echoParams">explicit</str>
<str name="qf">
content name
</str>
<int name="qs">1000</int>
<!-- example highlighter config, enable per-query with hl=true -->
<str name="hl">true</str>
<str name="hl.fl">content</str>
<!-- for this field, we want no fragmenting, just highlighting -->
<str name="f.content.hl.fragsize">150</str>
<!-- instructs Solr to return the field itself if no query terms are
found -->
<str name="f.name.hl.alternateField">name</str>
<str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
</lst>
</requestHandler>
--
Regards,
Viresh Modi
Re: dismax request handler will give wrong result in solr 4.3
Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Viresh,
A couple of things:
1) / character is a special query parser character now. It wasn't before. It is used for regular expression searches.
http://lucene.apache.org/core/4_6_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#Regexp_Searches
What happens when you use fq=metaData:("channelId/100" OR "channelId/10" OR "channelId/160" OR "channelId/12")
OR
fq={!lucene df=metaData q.op=OR}"channelId/100" "channelId/10" "channelId/160" "channelId/12"
On Wednesday, January 22, 2014 2:30 PM, Viresh Modi <vi...@highq.com> wrote:
When i use dismax query type handler in *SOLR 1.4 *and then same for *SOLR
4.3 *then both give different numFound record both have same index profile
as well.
means Solr 1.4 gives 9 records
and Solr 4.3 gives 99 records.
*My Query is:*
start=0&rows=10&hl=true&hl.fl=content&qt=dismax
&q=system admin
&fl=id,application,timestamp,name,score,metaData,metaDataDate
&fq=application:PunitR3_8
&fq= NOT ( id:OnlineR3_8_page_410_0 OR id:OnlineR3_8_page_411_0 OR
id:OnlineR3_8_page_628_0 )
&fq=(metaData:channelId/100 OR metaData:channelId/10 OR
metaData:channelId/160 OR metaData:channelId/12)&sort=score desc
*and In Solr Config.xml has handler::*
<requestHandler name="dismax" class="solr.SearchHandler" default="true">
<lst name="defaults">
<str name="defType">dismax</str>
<str name="echoParams">explicit</str>
<str name="qf">
content name
</str>
<int name="qs">1000</int>
<!-- example highlighter config, enable per-query with hl=true -->
<str name="hl">true</str>
<str name="hl.fl">content</str>
<!-- for this field, we want no fragmenting, just highlighting -->
<str name="f.content.hl.fragsize">150</str>
<!-- instructs Solr to return the field itself if no query terms are
found -->
<str name="f.name.hl.alternateField">name</str>
<str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
</lst>
</requestHandler>
--
Regards,
Viresh Modi