Tried submitting a filed for hl.fl still empty {}
here are the query terms
"responseHeader": {
"status": 0,
"QTime": 8,
"params": {
"q": "mary or calvin",
"hl": "true",
"hl.simple.post": "</em>",
"indent": "true",
"fl": "accession, title, author, date",
"hl.fl": "*",
"wt": "json",
"hl.simple.pre": "<em>",
"_": "1439388969240"
}
here is one of the responses, there were 135
{
"date": "1886-07-06",
"author": "Mary Baker Eddy",
"accession": "L02634",
"title": [
"Mary Baker Eddy to Josephine C. Woodbury, July 6, 1886"
]
},
here is the highlight section listing the first 10 matches, still empty {}
"highlighting": {
"/home/scott/workspace/mbel-work/tei2html/build/web/./L02634/L02634.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./A10720/A10720.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./L07894/L07894.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./L09828/L09828.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./A10636D/A10636D.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./L13943/L13943.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./A10594/A10594.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./A10385B/A10385B.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./A10879/A10879.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./L00003/L00003.html":
{}
}
-------- Original Message --------
Subject: Re: Highlighting
From: Scott Derrick <sc...@tnstaafl.net>
To: solr-user@lucene.apache.org
Date: 08/12/2015 06:39 AM
I was pretty sure I tried that, though I thought if you don't specify it
just uses the search terms?
If I just search for "calvin" and don't specify a field, what do I
assign hl.fl?
Scott
On 8/11/2015 7:27 PM, Erik Hatcher wrote:
Scott - doesn’t look you’ve specified hl.fl specifying which field(s)
to highlight.
p.s. Erick Erickson surely likes your e-mail domain :)
—
Erik Hatcher, Senior Solutions Architect
http://www.lucidworks.com <http://www.lucidworks.com/>
On Aug 11, 2015, at 9:02 PM, Scott Derrick <sc...@tnstaafl.net> wrote:
I guess I really don't get Highlighting in Solr.
We are transitioning from Google Custom Search which generally sucks,
but does return nicely formatted highlighted fragment.
I turn highlighting on hl=true in the query and I get a highlighting
section returned at the bottom of the page, each identified by the
document file name with a empty {} . It doesn't matter what I search
for, plain text, a field, I get a list of documents followed by an
empty brace?
"highlighting": {
"/home/scott/workspace/mbel-work/tei2html/build/web/./A10385B/A10385B.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./A10089/A10089.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./L00003/L00003.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./A10646/A10646.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./V03482/V03482.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./A10594/A10594.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./645A.66.043/645A.66.043.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./352.48.001/352.48.001.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./144.23.001/144.23.001.html":
{},
"/home/scott/workspace/mbel-work/tei2html/build/web/./L18512/L18512.html":
{}
}
I haven't made any changes to the default settings
<highlighting>
<!-- Configure the standard fragmenter -->
<!-- This could most likely be commented out in the "default"
case -->
<fragmenter name="gap"
default="true"
class="solr.highlight.GapFragmenter">
<lst name="defaults">
<int name="hl.fragsize">100</int>
</lst>
</fragmenter>
<!-- A regular-expression-based fragmenter
(for sentence extraction)
-->
<fragmenter name="regex"
class="solr.highlight.RegexFragmenter">
<lst name="defaults">
<!-- slightly smaller fragsizes work better because of slop
-->
<int name="hl.fragsize">70</int>
<!-- allow 50% slop on fragment sizes -->
<float name="hl.regex.slop">0.5</float>
<!-- a basic sentence pattern -->
<str name="hl.regex.pattern">[-\w
,/\n\"']{20,200}</str>
</lst>
</fragmenter>
<!-- Configure the standard formatter -->
<formatter name="html"
default="true"
class="solr.highlight.HtmlFormatter">
<lst name="defaults">
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
<str name="hl.simple.post"><![CDATA[</em>]]></str>
</lst>
</formatter>
<!-- Configure the standard encoder -->
<encoder name="html"
class="solr.highlight.HtmlEncoder" />
<!-- Configure the standard fragListBuilder -->
<fragListBuilder name="simple"
class="solr.highlight.SimpleFragListBuilder"/>
<!-- Configure the single fragListBuilder -->
<fragListBuilder name="single"
class="solr.highlight.SingleFragListBuilder"/>
<!-- Configure the weighted fragListBuilder -->
<fragListBuilder name="weighted"
default="true"
class="solr.highlight.WeightedFragListBuilder"/>
<!-- default tag FragmentsBuilder -->
<fragmentsBuilder name="default"
default="true"
class="solr.highlight.ScoreOrderFragmentsBuilder">
<!--
<lst name="defaults">
<str name="hl.multiValuedSeparatorChar">/</str>
</lst>
-->
</fragmentsBuilder>
<!-- multi-colored tag FragmentsBuilder -->
<fragmentsBuilder name="colored"
class="solr.highlight.ScoreOrderFragmentsBuilder">
<lst name="defaults">
<str name="hl.tag.pre"><![CDATA[
<b style="background:yellow">,<b
style="background:lawgreen">,
<b style="background:aquamarine">,<b
style="background:magenta">,
<b style="background:palegreen">,<b
style="background:coral">,
<b style="background:wheat">,<b
style="background:khaki">,
<b style="background:lime">,<b
style="background:deepskyblue">]]></str>
<str name="hl.tag.post"><![CDATA[</b>]]></str>
</lst>
</fragmentsBuilder>
<boundaryScanner name="default"
default="true"
class="solr.highlight.SimpleBoundaryScanner">
<lst name="defaults">
<str name="hl.bs.maxScan">10</str>
<str name="hl.bs.chars">.,!? 	 </str>
</lst>
</boundaryScanner>
<boundaryScanner name="breakIterator"
class="solr.highlight.BreakIteratorBoundaryScanner">
<lst name="defaults">
<!-- type should be one of CHARACTER, WORD(default), LINE
and SENTENCE -->
<str name="hl.bs.type">WORD</str>
<!-- language and country are used when constructing Locale
object. -->
<!-- And the Locale object will be used when getting
instance of BreakIterator -->
<str name="hl.bs.language">en</str>
<str name="hl.bs.country">US</str>
</lst>
</boundaryScanner>
</highlighting>
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
--
I do not want the peace which passeth understanding, I want the
understanding which bringeth peace.
Helen Keller