You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2014/03/16 05:56:00 UTC

[jira] [Updated] (SOLR-4089) FastVectorHighlighter produces superflouos snippets for alternateField

     [ https://issues.apache.org/jira/browse/SOLR-4089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Smiley updated SOLR-4089:
-------------------------------

    Fix Version/s:     (was: 4.7)
                   4.8

> 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.8
>
>         Attachments: SOLR-4089-trunk.patch
>
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)

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