Norberto Meijome wrote:
> Hi there,
>
> Short and sweet :
> Is SCRH intended to honour qt= ?
>
>
> longer...
> I'm testing the newest SCRH ( SOLR-572), using last night's nightly build.
>
> I have defined a 'dismax' request handler which searches across a number
of fields. When I use the SCRH in a query, and I pass the qt=dismax
parameter, it is ignored. Furthermore, the default field is shown as being
used when I add debugQuery=true.
>
> I could replace some of dismax's capabilities with a longer query string ,
but some parameters such as mm don't seem to exist with the standard handler.

it seems like it ought to work as a component of your dismax handler.  this
works for me:

   <requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
     <lst name="defaults">
       <str name="echoParams">none</str>
       <str name="indent">off</str>
       <str name="qf">search-en</str>
     </lst>
     <lst name="invariants">
       <str name="mm">100%</str>
       <str name="wt">json</str>
     </lst>
     <lst name="appends">
       <str name="fq">Type:Event</str>
     </lst>
     <arr name="last-components">
       <str>spellcheck</str>
     </arr>
   </requestHandler>

   <searchComponent name="spellcheck"
class="org.apache.solr.handler.component.SpellCheckComponent">
   ... from docs ...
   </searchComponent>

well *almost* - it works most excellently with q=$term but when I add
spellchecker.q=$term things implode:

HTTP Status 500 - null java.lang.NullPointerException at
org.apache.solr.handler.component.SpellCheckComponent.getTokens(SpellCheckComponent.java:215)
 at
org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:183)
 at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:156)
 at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:125)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:965) at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338) 
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:272)
 at...

not being a java guy I need to use solr out of the box, and adding
spellchecker.q makes my multi-word terms checked at the phrase level
("mickey mouse") instead of at the word level ("mickey" "mouse") which  is
the behavior I'm seeking.  the docs make it sound like I could write  my own
SpellingQueryConverter, but... well, they also use both q and
spellchecker.q at the same time, so it shouldn't implode like that :)

anyway, HTH

--Geoff



Reply via email to