Highlighting

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Highlighting

Mike Phillips
I don't understand why highlighting does not return anything but the document id.
I created a core imported all my data, everything seems like it should be working.
From reading the documentation I expect it to show me highlight information for
assetName around Potter, but I never get anything but the document id (assetId)

Here are the entries I added to managed-schema for assetName. Anybody know what
I should be targeting as a solution.

    <field name="assetName" type="string" multiValued="false" indexed="true" required="false" stored="true"/>
    <copyField source="assetName" dest="_text_"/>

#------------- My query and results -------------#
<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">1</int>
  <lst name="params">
    <str name="q">Potter</str>
    <str name="hl">on</str>
    <str name="hl.simple.post">&lt;/EM&gt;</str>
    <arr name="fq">
      <str>clientId:11</str>
      <str>assetTypeId:1</str>
    </arr>
    <str name="hl.simple.pre">&lt;EM&gt;</str>
    <str name="_">1555116259160</str>
  </lst>
</lst>
<result name="response" numFound="2" start="0">
  <doc>
    <long name="securityLevelId">3</long>
    <str name="assetName">Harry Potter and The Order of The Phoenix.mov</str>
    <date name="modify_timestamp">2012-09-27T02:34:27Z</date>
    <str name="digitalFormatId">Quicktime with Audio</str>
    <long name="assetTypeId">1</long>
    <long name="clientId">11</long>
    <str name="securityLevelCode">Level 3</str>
    <long name="assetIdLong">27</long>
    <str name="assetId">27</str>
    <str name="filename">Harry Potter and The Order of The Phoenix.mov</str>
    <str name="frameRateId">23.976</str>
    <str name="timeCodeId">Non drop frame</str>
    <str name="aspectRatioId">2.35</str>
    <str name="audioWordSizeId">16</str>
    <str name="chromaFormatId">4:2:0</str>
    <long name="_version_">1624857205677228032</long></doc>
  <doc>
    <long name="securityLevelId">3</long>
    <str name="assetName">StudelyCastleHotel</str>
    <date name="modify_timestamp">2019-04-12T22:57:33Z</date>
    <str name="digitalFormatId">JPEG</str>
    <long name="assetTypeId">1</long>
    <long name="clientId">11</long>
    <str name="securityLevelCode">Level 3</str>
    <long name="assetIdLong">10130</long>
    <str name="assetId">10130</str>
    <arr name="noteType">
      <str>Producer</str>
    </arr>
    <arr name="notes">
      <str>Michael Potter</str>
    </arr>
    <arr name="noteId">
      <long>7</long>
    </arr>
    <str name="filename">StudelyCastleHotel</str>
    <long name="_version_">1630650901282684928</long></doc>
</result><lst name="highlighting">
  <lst name="27"/>
  <lst name="10130"/>
</lst>
Reply | Threaded
Open this post in threaded view
|

Re: Highlighting

Shawn Heisey-2
On 4/15/2019 11:36 AM, Mike Phillips wrote:
> I don't understand why highlighting does not return anything but the document id.
> I created a core imported all my data, everything seems like it should be working.
>  From reading the documentation I expect it to show me highlight information for
> assetName around Potter, but I never get anything but the document id (assetId)

I'll caution you that I do not know very much about highlighting at all.
  I've only toyed with it, have never actually USED it for real.

But I do think you need the fields you're interested in doing
highlighting on in the hl.fl parameter.  This parameter is not shown in
the output you shared.

I also think that the fields you want to highlight on must be included
in the query, so that position data is found, but I am not positive
about this -- I could be wrong.

If you share the entry from solr.log where the query is logged, we will
be able to see ALL of the parameters used for that query, even if they
are not echoed in the results.  You could also add "echoParams=all" to
the parameter list to see all of the parameters in the response.

Thanks,
Shawn