lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "DIHCustomFunctions" by FrankWesemann
Date Mon, 11 Jul 2011 10:46:35 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "DIHCustomFunctions" page has been changed by FrankWesemann:
http://wiki.apache.org/solr/DIHCustomFunctions?action=diff&rev1=3&rev2=4

Comment:
the example has to extend Evaluator ( it is not an interface )

  = Custom Functions for DIH =
  It is possible to plug in custom functions into DIH. Implement an [[http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/Evaluator.java?view=markup|Evaluator]]
and specify it in the data-config.xml . Following is an example of an evaluator which does
a 'toLowerCase' on a String.
+ 
  {{{
  <dataConfig>
     <function name="toLowerCase" class="foo.LowerCaseFunctionEvaluator"/>
@@ -11, +12 @@

     </entity>
  </dataConfig>
  }}}
+ The implementation of !LowerCaseFunctionEvaluator
  
- The implementation of !LowerCaseFunctionEvaluator
  {{{
-   public class LowerCaseFunctionEvaluator implements Evaluator{
+   public class LowerCaseFunctionEvaluator extends Evaluator{
      public String evaluate(String expression, Context context) {
        List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
  

Mime
View raw message