lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koji Sekiguchi (Closed) (JIRA)" <>
Subject [jira] [Closed] (SOLR-491) highlight doesn't work with range search
Date Mon, 20 Feb 2012 06:15:34 GMT


Koji Sekiguchi closed SOLR-491.

    Resolution: Duplicate
      Assignee: Koji Sekiguchi

This should be done at some point. Closing as duplicate.
> highlight doesn't work with range search
> ----------------------------------------
>                 Key: SOLR-491
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 1.3
>         Environment: windows xp sp2  jboss4.0.5 
>            Reporter: Xuesong Luo
>            Assignee: Koji Sekiguchi
>            Priority: Minor
> I need to do range search on an integer field, which is defined as type sint. It works
fine without highlight. However if I turn on highlight, I got the following error:
> 2008-02-25 16:54:53,524 ERROR [STDERR] Feb 25, 2008 4:54:53 PM org.apache.solr.core.SolrCore
> INFO: [xluo] /select/rows=10&start=0&hl.fl=bookCount&indent=on&q=bookCount:5&hl=true&version=2.2
0 0
> 2008-02-25 16:54:53,524 ERROR [STDERR] Feb 25, 2008 4:54:53 PM  org.apache.solr.common.SolrException
> SEVERE: java.lang.NumberFormatException: For input string: "   "
>  at  java.lang.NumberFormatException.forInputString(
>  at java.lang.Long.parseLong(
>  at java.lang.Long.parseLong(
>  at org.apache.solr.util.NumberUtils.long2sortableStr(
>  at org.apache.solr.schema.SortableLongField.toInternal(
>  at org.apache.solr.schema.FieldType$DefaultAnalyzer$
>  at
>  at
> I also tried range strange on data field, got similr error too when use highlight. I
posted the problem at solr user list, here is what Hoss said:
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> I'm not sure if i really understand what it would mean to highlight a numeric field,
 hilighting a range query probably won't ever work 
> because of the way range queries are implemented in Solr ... but at the very least there
should be a better error message in this case.  (and the 
> case of a simple single value numeric lookup should probably work)
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> The reason I need to highlight the numeric or data field is I have to loop through the
search result to apply role permission check on those fields. If the searcher doesn't have
permission to see the numeric/date field of the user in the search result list, that field
should be set to null when returned. If the search doesn't have permission on all matching
fields, then the whole record should not be returned. How can I find out which field is the
matching field if searching on multiple fields? The only easy way I can think about is if
the field is highlighted, it's a matching field.  

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message