RE: Error using Custom Functions for DIH

2011-07-11 Thread Aviraj Chavan
Hello,

Can anyone guide me on this issue?

Regards
Aviraj
-Original Message-
From: Aviraj Chavan [mailto:aviraj_cha...@persistent.co.in]
Sent: Saturday, July 09, 2011 2:20 PM
To: solr-user@lucene.apache.org
Subject: Error using Custom Functions for DIH

Hi,

I am trying to use DIH custom function by referring 
http://wiki.apache.org/solr/DIHCustomFunctions, I have prepared jar file 
containing my custom class and placed it in solr lib directory. For Full-import 
command, I am  getting "Full Import failed:java.lang.NoClassDefFoundError: 
org/apache/solr/handler/dataimport/Evaluator" exception.

As there is no enough documentation available I am stuck, tried adding 
dependencies didn't worked. Any pointers or suggestions is appreciated.

package com.custom;
import org.apache.solr.handler.dataimport.Evaluator;
import org.apache.solr.handler.dataimport.VariableResolver;

public class PrepareQuery extends Evaluator {
@Override
public String evaluate(VariableResolver arg0, String arg1) {
String subQueryStr = "select ID, CATEGORY_NAME 
from CATEGORY_MASTER where ID=" + arg1;
return subQueryStr.toString();
}
}


 
...




Thanks
Aviraj


DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.


DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.



Error using Custom Functions for DIH

2011-07-09 Thread Aviraj Chavan
Hi,

I am trying to use DIH custom function by referring 
http://wiki.apache.org/solr/DIHCustomFunctions, I have prepared jar file 
containing my custom class and placed it in solr lib directory. For Full-import 
command, I am  getting "Full Import failed:java.lang.NoClassDefFoundError: 
org/apache/solr/handler/dataimport/Evaluator" exception.

As there is no enough documentation available I am stuck, tried adding 
dependencies didn't worked. Any pointers or suggestions is appreciated.

package com.custom;
import org.apache.solr.handler.dataimport.Evaluator;
import org.apache.solr.handler.dataimport.VariableResolver;

public class PrepareQuery extends Evaluator
{
@Override
public String evaluate(VariableResolver arg0, String arg1) {
String subQueryStr = "select ID, CATEGORY_NAME 
from CATEGORY_MASTER where ID=" + arg1;
return subQueryStr.toString();
}
}




...




Thanks
Aviraj


DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.