lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Jelsma (JIRA)" <j...@apache.org>
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
                 URL: https://issues.apache.org/jira/browse/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.

{code}
<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"/>
{code}

Index the example data and run the query

{code}
http://localhost:8983/solr/select?q=id:6H500F0&hl=true&hl.fl=name*&hl.alternateField=id&hl.useFastVectorHighlighter=true
{code}

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

{code}
<response>

<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>
  </lst>
</lst>
<result name="response" numFound="1" start="0">
  <doc>
    <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>electronics</str>
      <str>hard drive</str>
    </arr>
    <arr name="features">
      <str>SATA 3.0Gb/s, NCQ</str>
      <str>8.5ms seek</str>
      <str>16MB cache</str>
    </arr>
    <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>
</result>
<lst name="highlighting">
  <lst name="6H500F0">
    <arr name="name">
      <str>6H500F0</str>
    </arr>
    <arr name="name_c">
      <str>6H500F0</str>
    </arr>
    <arr name="name_b">
      <str>6H500F0</str>
    </arr>
    <arr name="name_a">
      <str>6H500F0</str>
    </arr>
    <arr name="name_d">
      <str>6H500F0</str>
    </arr>
  </lst>
</lst>
</response>
{code}

--
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: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message