You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Christine Poerschke (JIRA)" <ji...@apache.org> on 2015/12/07 16:57:11 UTC

[jira] [Commented] (SOLR-8360) ExternalFileField.getValueSource uses req.datadir but this.schema

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

Christine Poerschke commented on SOLR-8360:
-------------------------------------------

Hi [~romseygeek] - saw your name in the history of this class/method and wondered if you would have any thoughts on this JIRA here? As I see it, if req.datadir and this.datadir are always the same (and req.schema and this.schema are always the same) then the 'Option 2' patch would simplify the code. On the other hand, if req.schema and this.schema can sometimes be different then the 'Option 1' patch might be fixing an edge case bug? Or 'Option 3' could be to only add a clarifying comment that and why this.schema rather than req.schema is used combined with req.datadir.

> ExternalFileField.getValueSource uses req.datadir but this.schema
> -----------------------------------------------------------------
>
>                 Key: SOLR-8360
>                 URL: https://issues.apache.org/jira/browse/SOLR-8360
>             Project: Solr
>          Issue Type: Task
>            Reporter: Christine Poerschke
>            Assignee: Christine Poerschke
>         Attachments: SOLR-8360-option1.patch, SOLR-8360-option2.patch
>
>
> {{ExternalFileField.getValueSource(SchemaField field, QParser parser)}} has available:
> * datadir
> ** parser.getReq().getCore().getDataDir()
> ** this.schema.getResourceLoader().getDataDir()
> * schema
> ** parser.getReq().getSchema()
> ** this.schema
> {{ExternalFileField.getValueSource}} uses {{parser.getReq().getCore().getDataDir()}} explicitly but implicitly {{this.schema}} - should it use {{parser.getReq().getSchema()}} instead (Option 1 patch)? Or if in practice actually req.datadir and this.datadir are always the same could we stop using the parser argument (Option 2 patch (1 line))?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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