lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohammad Abul Khaer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-6010) Wrong highlighting while querying by date range with wild card in the end range
Date Fri, 25 Apr 2014 10:53:15 GMT

    [ https://issues.apache.org/jira/browse/SOLR-6010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13980875#comment-13980875
] 

Mohammad Abul Khaer commented on SOLR-6010:
-------------------------------------------

Tried that one. In that case solr return highlighting as follows

{code}
"highlighting": {
    "article:838": {},
    "article:840": {},
    "article:839": {},
    "article:824": {},
    "article:834": {},
    "article:835": {},
    "article:832": {},
    "article:833": {},
    "article:826": {},
    "article:825": {}
  }
{code}

> 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
>              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.



--
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


Mime
View raw message