[
https://issues.apache.org/jira/browse/SOLR-6010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Smiley resolved SOLR-6010.
--------------------------------
Resolution: Not A Problem
While I didn't try to reproduce this, I think the problem won't occur in Solr 7
with DatePointField (replaces older TrieDateField). Even with TrieDateField,
if you use the hl.method=unified (UnifiedHighlighter) in 6.x this problem would
not occur. It wouldn't happen with the fast vector highlighter either. I
could imagine the original highlighter still does or used to exhibit this
problem. Varun's right on hl.requireFieldMatch which probably should have been
defaulted to true but alas defaults to false. You got no results probably
because of a mismatch between the field you are highlighting and the field
referenced in your query.
I'm going to mark closed.
> Wrong highlighting while querying by date range with wild card in the end
> range
> -------------------------------------------------------------------------------
>
> Key: SOLR-6010
> URL: https://issues.apache.org/jira/browse/SOLR-6010
> Project: Solr
> Issue Type: Bug
> Components: highlighter, query parsers
> Affects Versions: 4.0
> Environment: java version "1.7.0_45"
> Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
> Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
> Linux 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64
> x86_64 x86_64 GNU/Linux
> Reporter: Mohammad Abul Khaer
> Priority: Major
> Labels: date, highlighting, range, solr
>
> Solr is returning wrong highlights when I have a date range query with wild
> card *in the end range*. For example my query *q* is
> {noformat}
> (porta)+activatedate:[* TO
> 2014-04-24T09:55:00Z]+expiredate:[2014-04-24T09:55:00Z TO *]
> {noformat}
> In the above query activatedate, expiredate are date fields. Their definition
> in schema file is as follows
> {code}
> <field name="activatedate" type="date" indexed="true" stored="false"
> omitNorms="true"/>
> <field name="expiredate" type="date" indexed="true" stored="false"
> omitNorms="true"/>
> {code}
> In the query result I am getting wrong highlighting information. Only
> highlighting result is show below
> {code}
> "highlighting": {
> "article:3605": {
> "title": [
> "The <em>creative</em> <em>headline</em> of this <em>story</em>
> <em>really</em> <em>says</em> it <em>all</em>"
> ],
> "summary": [
> "<em>Etiam</em> <em>porta</em> <em>sem</em> <em>malesuada</em>
> <em>magna</em> <em>mollis</em> <em>euismod</em> <em>aenean</em> <em>eu</em>
> <em>leo</em> <em>quam</em>. <em>Pellentesque</em> <em>ornare</em>
> <em>sem</em> <em>lacinia</em> <em>quam</em>."
> ]
> },
> "article:3604": {
> "title": [
> "The <em>creative</em> <em>headline</em> of this <em>story</em>
> <em>really</em> <em>says</em> it <em>all</em>"
> ],
> "summary": [
> "<em>Etiam</em> <em>porta</em> <em>sem</em> <em>malesuada</em>
> <em>magna</em> <em>mollis</em> <em>euismod</em> <em>aenean</em> <em>eu</em>
> <em>leo</em> <em>quam</em>. <em>Pellentesque</em> <em>ornare</em>
> <em>sem</em> <em>lacinia</em> <em>quam</em>.."
> ]
> }
> }
> {code}
> It should highlight only *story* word but it is highlighting lot other words
> also. What I noticed that this happens only if I have a wildcard * in the end
> range. If I change the above query and set a fixed date in the end range
> instead of * then solr return correct highlights. Modified query is shown
> below -
> {noformat}
> (porta)+activatedate:[* TO
> 2014-04-24T09:55:00Z]+expiredate:[2014-04-24T09:55:00Z TO
> 3014-04-24T09:55:00Z]
> {noformat}
> I guess its a bug in SOLR. If I use filter query *fq* instead of normal query
> *q* then highlighting result is OK for both queries.
> *Update*
> If I use a specific date instead of * still it returns wrong highlights. This
> time it highlights numbers also. Say I am searching for the word *math* then
> it also highlights number with *math*. As for example if title of my article
> is *Mathematics 1234* then it highlights *1234* also with *math*.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]