For the Drupal Apache Solr Integration module, we are exploring the
possibility of doing facet browsing  - since we are using dismax as
the default handler, this would mean issuing a query with an empty q
and falling back to to q.alt='*:*' or some other q.alt that matches
all docs.

However, I notice when I do this that we do not get any highlights
back in the results despite defining a highlight alternate field.

In contrast, if I force the standard request handler then I do get
text back from the highlight alternate field:

select/?q=*:*&qt=standard&hl=true&hl.fl=body&hl.alternateField=body&hl.maxAlternateFieldLength=256

However, I then loose the nice dismax features of weighting the
results using bq and bf parameters.  So, is this a bug or the intended
behavior?

The relevant fragment of the solrconfig.xml is this:

  <requestHandler name="partitioned" class="solr.SearchHandler" default="true">
    <lst name="defaults">
     <str name="defType">dismax</str>

     <str name="q.alt">*:*</str>

   <!-- example highlighter config, enable per-query with hl=true -->
     <str name="hl">true</str>
     <str name="hl.fl">body</str>
     <int name="hl.snippets">3</int>
     <str name="hl.mergeContiguous">true</str>
   <!-- instructs Solr to return the field itself if no query terms are
        found -->
     <str name="f.body.hl.alternateField">body</str>
     <str name="f.body.hl.maxAlternateFieldLength">256</str>


Full solrconfig.xml and other files:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/apachesolr/?pathrev=DRUPAL-6--1

-- 
Peter M. Wolanin, Ph.D.
Momentum Specialist,  Acquia. Inc.
peter.wola...@acquia.com

Reply via email to