You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Zotter (JIRA)" <ji...@apache.org> on 2011/04/08 22:49:05 UTC
[jira] [Created] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Using an evaluator outside the scope of an entity results in a null context
---------------------------------------------------------------------------
Key: SOLR-2463
URL: https://issues.apache.org/jira/browse/SOLR-2463
Project: Solr
Issue Type: Bug
Components: contrib - DataImportHandler
Affects Versions: 3.1, 3.1.1, 4.0
Reporter: Robert Zotter
Priority: Minor
When using an Evaluator outside an entity element the Context argument is null.
public class LowerCaseFunctionEvaluator extends Evaluator {
public String evaluate(String expression, Context context) {
List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
if (l.size() != 1) {
throw new RuntimeException("'toLowerCase' must have only one parameter ");
}
return l.get(0).toString().toLowerCase();
}
}
<dataSource name="..."
type="..."
driver="..."
url="..."
user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
password="..."
batchSize="..."/>
<entity name="..."
dataSource="..."
query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"
--
This message is automatically generated by JIRA.
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
[jira] [Updated] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Robert Zotter (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zotter updated SOLR-2463:
--------------------------------
Priority: Major (was: Minor)
Affects Version/s: (was: 3.1)
3.5
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1.1, 3.5, 4.0
> Reporter: Robert Zotter
> Assignee: Shalin Shekhar Mangar
> Fix For: 3.1.1
>
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
>
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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
[jira] [Updated] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Robert Zotter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zotter updated SOLR-2463:
--------------------------------
Description:
When using an Evaluator outside an entity element the Context argument is null.
{code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
public class LowerCaseFunctionEvaluator extends Evaluator {
public String evaluate(String expression, Context context) {
List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
if (l.size() != 1) {
throw new RuntimeException("'toLowerCase' must have only one parameter ");
}
return l.get(0).toString().toLowerCase();
}
}
{code}
{code:title=data-config.xml|borderStyle=solid}
<dataSource name="..."
type="..."
driver="..."
url="..."
user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
password="..."/>
{code}
{code:title=data-config.xml|borderStyle=solid}
<entity name="..."
dataSource="..."
query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
{code}
This use case worked in 1.4
was:
When using an Evaluator outside an entity element the Context argument is null.
{code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
public class LowerCaseFunctionEvaluator extends Evaluator {
public String evaluate(String expression, Context context) {
List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
if (l.size() != 1) {
throw new RuntimeException("'toLowerCase' must have only one parameter ");
}
return l.get(0).toString().toLowerCase();
}
}
{code}
{code:title=data-config.xml|borderStyle=solid}
<dataSource name="..."
type="..."
driver="..."
url="..."
user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
password="..."/>
{code}
{code:title=data-config.xml|borderStyle=solid}
<entity name="..."
dataSource="..."
query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
{code}
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1, 3.1.1, 4.0
> Reporter: Robert Zotter
> Priority: Minor
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
This message is automatically generated by JIRA.
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
[jira] [Assigned] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shalin Shekhar Mangar reassigned SOLR-2463:
-------------------------------------------
Assignee: Shalin Shekhar Mangar
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1, 3.1.1, 4.0
> Reporter: Robert Zotter
> Assignee: Shalin Shekhar Mangar
> Priority: Minor
> Fix For: 3.1.1
>
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
>
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
This message is automatically generated by JIRA.
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
[jira] [Commented] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Robert Zotter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13456077#comment-13456077 ]
Robert Zotter commented on SOLR-2463:
-------------------------------------
Still an issue in 3.6.1
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1.1, 3.5, 3.6, 4.0-ALPHA, 3.6.1
> Reporter: Robert Zotter
> Assignee: Shalin Shekhar Mangar
> Fix For: 3.1.1
>
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
>
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
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
[jira] [Commented] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Robert Zotter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018103#comment-13018103 ]
Robert Zotter commented on SOLR-2463:
-------------------------------------
Also observing this behavior during delta-imports on deletedQuery and deletedPkQuery.
{code}
<entity name="..."
dataSource="..."
query="..."
deltaQuery="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_ALSO_NOT_WORK')}"
deletedPkQuery="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_ALSO_NOT_WORK')}"/>
{code}
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1, 3.1.1, 4.0
> Reporter: Robert Zotter
> Priority: Minor
> Fix For: 3.1.1
>
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
>
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
This message is automatically generated by JIRA.
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
Re: [jira] [Commented] (SOLR-2463) Using an evaluator outside the
scope of an entity results in a null context
Posted by Frank Wesemann <f....@fotofinder.net>.
Jeffrey,
can you supply some more information like data-config.xml, stacktrace
and what your delta-query looks like?
> [ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046346#comment-13046346 ]
>
> Jeffrey Chang commented on SOLR-2463:
> -------------------------------------
>
> I just tried delta-imports on 3.2, this is still unresolved. I also tried applying SOLR-2186 patch but no luck.
>
--
mit freundlichem Gruß,
Frank Wesemann
Fotofinder GmbH USt-IdNr. DE812854514
Software Entwicklung Web: http://www.fotofinder.com/
Potsdamer Str. 96 Tel: +49 30 25 79 28 90
10785 Berlin Fax: +49 30 25 79 28 999
Sitz: Berlin
Amtsgericht Berlin Charlottenburg (HRB 73099)
Geschäftsführer: Ali Paczensky
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Jeffrey Chang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046346#comment-13046346 ]
Jeffrey Chang commented on SOLR-2463:
-------------------------------------
I just tried delta-imports on 3.2, this is still unresolved. I also tried applying SOLR-2186 patch but no luck.
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1, 3.1.1, 4.0
> Reporter: Robert Zotter
> Assignee: Shalin Shekhar Mangar
> Priority: Minor
> Fix For: 3.1.1
>
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
>
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
This message is automatically generated by JIRA.
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
[jira] [Updated] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Robert Zotter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zotter updated SOLR-2463:
--------------------------------
Affects Version/s: 3.6
3.6.1
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1.1, 3.5, 3.6, 4.0-ALPHA, 3.6.1
> Reporter: Robert Zotter
> Assignee: Shalin Shekhar Mangar
> Fix For: 3.1.1
>
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
>
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
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
[jira] [Commented] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Frank Wesemann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044105#comment-13044105 ]
Frank Wesemann commented on SOLR-2463:
--------------------------------------
it's not a problem of the Evaluators but of the DocBuilder
see SOLR-2186
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1, 3.1.1, 4.0
> Reporter: Robert Zotter
> Assignee: Shalin Shekhar Mangar
> Priority: Minor
> Fix For: 3.1.1
>
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
>
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
This message is automatically generated by JIRA.
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
[jira] [Updated] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Robert Zotter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zotter updated SOLR-2463:
--------------------------------
Description:
When using an Evaluator outside an entity element the Context argument is null.
{code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
public class LowerCaseFunctionEvaluator extends Evaluator {
public String evaluate(String expression, Context context) {
List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
if (l.size() != 1) {
throw new RuntimeException("'toLowerCase' must have only one parameter ");
}
return l.get(0).toString().toLowerCase();
}
}
{code}
{code:title=data-config.xml|borderStyle=solid}
<dataSource name="..."
type="..."
driver="..."
url="..."
user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
password="..."/>
{code}
{code:title=data-config.xml|borderStyle=solid}
<entity name="..."
dataSource="..."
query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
{code}
This use case worked in 1.4
was:
When using an Evaluator outside an entity element the Context argument is null.
{code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
public class LowerCaseFunctionEvaluator extends Evaluator {
public String evaluate(String expression, Context context) {
List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
if (l.size() != 1) {
throw new RuntimeException("'toLowerCase' must have only one parameter ");
}
return l.get(0).toString().toLowerCase();
}
}
{code}
{code:title=data-config.xml|borderStyle=solid}
<dataSource name="..."
type="..."
driver="..."
url="..."
user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
password="..."/>
{code}
{code:title=data-config.xml|borderStyle=solid}
<entity name="..."
dataSource="..."
query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
{code}
This use case worked in 1.4
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1, 3.1.1, 4.0
> Reporter: Robert Zotter
> Priority: Minor
> Fix For: 3.1.1
>
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
>
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
This message is automatically generated by JIRA.
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
[jira] [Updated] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Robert Zotter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zotter updated SOLR-2463:
--------------------------------
Fix Version/s: 3.1.1
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1, 3.1.1, 4.0
> Reporter: Robert Zotter
> Priority: Minor
> Fix For: 3.1.1
>
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
This message is automatically generated by JIRA.
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
[jira] [Updated] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Robert Zotter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zotter updated SOLR-2463:
--------------------------------
Description:
When using an Evaluator outside an entity element the Context argument is null.
{code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
public class LowerCaseFunctionEvaluator extends Evaluator {
public String evaluate(String expression, Context context) {
List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
if (l.size() != 1) {
throw new RuntimeException("'toLowerCase' must have only one parameter ");
}
return l.get(0).toString().toLowerCase();
}
}
{code}
{code:title=data-config.xml|borderStyle=solid}
<dataSource name="..."
type="..."
driver="..."
url="..."
user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
password="..."/>
{code}
{code:title=data-config.xml|borderStyle=solid}
<entity name="..."
dataSource="..."
query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
{code}
was:
When using an Evaluator outside an entity element the Context argument is null.
public class LowerCaseFunctionEvaluator extends Evaluator {
public String evaluate(String expression, Context context) {
List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
if (l.size() != 1) {
throw new RuntimeException("'toLowerCase' must have only one parameter ");
}
return l.get(0).toString().toLowerCase();
}
}
<dataSource name="..."
type="..."
driver="..."
url="..."
user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
password="..."
batchSize="..."/>
<entity name="..."
dataSource="..."
query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1, 3.1.1, 4.0
> Reporter: Robert Zotter
> Priority: Minor
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
--
This message is automatically generated by JIRA.
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
[jira] [Commented] (SOLR-2463) Using an evaluator outside the scope
of an entity results in a null context
Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040973#comment-13040973 ]
Lance Norskog commented on SOLR-2463:
-------------------------------------
How many Evaluators are there? I confess I have not seen this feature of DIH before. Are there unit tests for the feature, and its various permutations? If not, I would not rely on the feature.
> Using an evaluator outside the scope of an entity results in a null context
> ---------------------------------------------------------------------------
>
> Key: SOLR-2463
> URL: https://issues.apache.org/jira/browse/SOLR-2463
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 3.1, 3.1.1, 4.0
> Reporter: Robert Zotter
> Assignee: Shalin Shekhar Mangar
> Priority: Minor
> Fix For: 3.1.1
>
>
> When using an Evaluator outside an entity element the Context argument is null.
> {code:title=foo.LowerCaseFunctionEvaluator.java|borderStyle=solid}
> public class LowerCaseFunctionEvaluator extends Evaluator {
> public String evaluate(String expression, Context context) {
> List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
>
> if (l.size() != 1) {
> throw new RuntimeException("'toLowerCase' must have only one parameter ");
> }
> return l.get(0).toString().toLowerCase();
> }
> }
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <dataSource name="..."
> type="..."
> driver="..."
> url="..."
> user="${dataimporter.functions.toLowerCase('THIS_WILL_NOT_WORK')}"
> password="..."/>
> {code}
> {code:title=data-config.xml|borderStyle=solid}
> <entity name="..."
> dataSource="..."
> query="select * from ${dataimporter.functions.toLowerCase('THIS_WILL_WORK')}"/>
> {code}
> This use case worked in 1.4
--
This message is automatically generated by JIRA.
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