lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-3916) fl parsing is sensitive to newlines at the end of field names
Date Fri, 05 Oct 2012 21:58:02 GMT

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

Hoss Man commented on SOLR-3916:
--------------------------------

bq. In the context of grabbing defaults from XML, we should consider trimming whitespace in
the process of generating those defaults (rather than later).

...which can be pursued in another issue if you wish to do so.

as i've already said: this current bug is _not_ specific to getting defaults from the xml
file, nor is it specific to leading/trailing whitespace that could be easily trimmed in a
generic way.  Having a tab or newline or any whitespace character other then a simple ' '
between the names of fields in an "fl" string causes this annoying little bug -- regardless
of whether it comes from xml config, or a remote client.

If you look at the patch, you can see my point quite easily: when parsing the fl, ReturnFields
is naively only treating the ' ' character as whitespace and not recognizing any other whitespace
characters that might exist between field names.
                
> fl parsing is sensitive to newlines at the end of field names
> -------------------------------------------------------------
>
>                 Key: SOLR-3916
>                 URL: https://issues.apache.org/jira/browse/SOLR-3916
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.0-BETA
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>             Fix For: 4.0
>
>         Attachments: SOLR-3916.patch
>
>
> As reported by giovanni.bricconi on the user list, there is a bug in "fl" parsing that
causes solr to get confused when a field name is followed by a newline character -- eg: in
a requestHandler default like...
> {noformat}
> <!-- newlines showing using "$" -->$
> <str name="fl">$
>    sku,store_slug$  
> </str>$
> {noformat}
> ...this results in solr assuming it should use function parsing to evaluate the field
name, which can cause missleading errors if the field name can't be used in a function (eg:
"can not use FieldCache on multivalued field: store_slug")

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message