lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] [Updated] (SOLR-3916) fl parsing is sensitive to newlines at the end of field names
Date Fri, 05 Oct 2012 20:16:03 GMT


Hoss Man updated SOLR-3916:

    Attachment: SOLR-3916.patch

blaming this on xml parsing doesn't really seem productive, espeicially since you can trivially
reproduce the problem from a remote client (or even with the solr admin UI) if you accidentally
cut/paste tab characters or newlines mixed in your list of fields.

The fix is trivial: in some places the fl parser was naivly only checking character equality
with ' ' instead of using Character.isWhitespace().  

patch with tests attached, running all tests and precommit on my computer now for further
> fl parsing is sensitive to newlines at the end of field names
> -------------------------------------------------------------
>                 Key: SOLR-3916
>                 URL:
>             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:

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

View raw message