lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Antonio Farré Basurte (JIRA) <>
Subject [jira] [Created] (SOLR-2632) Highlighting does not work for embedded boost query that boosts a dismax query
Date Sat, 02 Jul 2011 23:20:21 GMT
Highlighting does not work for embedded boost query that boosts a dismax query

                 Key: SOLR-2632
             Project: Solr
          Issue Type: Bug
          Components: highlighter
    Affects Versions: 3.2, 1.4.1
         Environment: Linux.
Reproduced in different machines with different Linux distributions and different JDK's.
Lucidworks for solr 1.4.1 and 3.2.
            Reporter: Juan Antonio Farré Basurte
            Priority: Minor

I need to issue a dismax query, with date boost (I'd like to use the multiplicative boost
provided by boost queries) and also filtering for other fields with too many possible distinct
values to fit in a filter query. To achieve this, I use the boost query as a nested query
using the pseudofield _query_. I also need highlighting for the fields used in the dismax
query, but highlighting does not work. If I just use the boosted dismax query without embedding
it inside another query, it works correctly. If I use bf instead of a boost query, and embed
directly the dismax query, it works too, but hl.fl needs to be specified.

It's a bit complicated to explain, so, I'll give examples using the example data that comes
with solr (the problem is reproducible in the example solr distribution, not only in my concrete

For this query, highlighting does not work. Specifying hl.fl or not, does not influence the
result. The result is:
<lst name="highlighting">
  <lst name="GB18030TEST"/>
  <lst name="UTF8TEST"/>


This doesn't work either. Same result.

http://localhost:8983/solr/select?q={!boost b=$dateboost v=$qq defType=dismax}&qq=test&qf=name&dateboost=recip(ms(NOW,last_modified),3.16e-11,1,1)&hl=true

In this case, hightlighting works correctly:

<lst name="highlighting">
  <lst name="GB18030TEST">
    <arr name="name">
      <str><em>Test</em> with some GB18030 encoded characters</str>
  <lst name="UTF8TEST">
    <arr name="name">
      <str><em>Test</em> with some UTF-8 encoded characters</str>


This also works. Same result as before. But in this case hl.fl is needed. Without it, highlighting
does not work, either.


This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message