lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Jelsma (JIRA)" <>
Subject [jira] [Created] (SOLR-4089) FastVectorHighlighter produces superflouos snippets for alternateField
Date Fri, 16 Nov 2012 12:42:17 GMT
Markus Jelsma created SOLR-4089:

             Summary: FastVectorHighlighter produces superflouos snippets for alternateField
                 Key: SOLR-4089
             Project: Solr
          Issue Type: Bug
          Components: highlighter
    Affects Versions: 4.0
            Reporter: Markus Jelsma
             Fix For: 4.1, 5.0

Highlighter produces multiple snippets for the alternateField when using FVH only. This only
becomes obvious when using using a glob for the hl.fl parameter. It's easy to reproduce by
slighly modifying the example schema.

Add the following fields to the schema. The more name_* fields you add, the more snippets
are produced, one for each field matching the glob. The problem is only visible if alternateField
is specified to any existing field.

<field name="name_a" type="text_general" indexed="true" stored="true"/>
<field name="name_b" type="text_general" indexed="true" stored="true"/>
<field name="name_c" type="text_general" indexed="true" stored="true"/>
<copyField source="name" dest="name_a"/>
<copyField source="name" dest="name_b"/>
<copyField source="name" dest="name_c"/>

Index the example data and run the query


This will produce one snippet for each field that didn't match anyway instead of emitting
only the ID field as alternate.


<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">5</int>
  <lst name="params">
    <str name="hl.useFastVectorHighlighter">true</str>
    <str name="indent">true</str>
    <str name="q">id:6H500F0</str>
    <str name="hl.alternateField">id</str>
    <str name="hl.fl">name*</str>
    <str name="hl">true</str>
<result name="response" numFound="1" start="0">
    <str name="id">6H500F0</str>
    <str name="name">Maxtor DiamondMax 11 - hard drive - 500 GB - SATA-300</str>
    <str name="name_a">Maxtor DiamondMax 11 - hard drive - 500 GB - SATA-300</str>
    <str name="name_b">Maxtor DiamondMax 11 - hard drive - 500 GB - SATA-300</str>
    <str name="name_c">Maxtor DiamondMax 11 - hard drive - 500 GB - SATA-300</str>
    <str name="name_d">Maxtor DiamondMax 11 - hard drive - 500 GB - SATA-300</str>
    <str name="manu">Maxtor Corp.</str>
    <str name="manu_id_s">maxtor</str>
    <arr name="cat">
      <str>hard drive</str>
    <arr name="features">
      <str>SATA 3.0Gb/s, NCQ</str>
      <str>8.5ms seek</str>
      <str>16MB cache</str>
    <float name="price">350.0</float>
    <str name="price_c">350,USD</str>
    <int name="popularity">6</int>
    <bool name="inStock">true</bool>
    <str name="store">45.17614,-93.87341</str>
    <date name="manufacturedate_dt">2006-02-13T15:26:37Z</date>
    <long name="_version_">1418796316951052288</long></doc>
<lst name="highlighting">
  <lst name="6H500F0">
    <arr name="name">
    <arr name="name_c">
    <arr name="name_b">
    <arr name="name_a">
    <arr name="name_d">

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

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

View raw message