lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r813676 - in /lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport: EntityProcessorWrapper.java FieldReaderDataSource.java
Date Fri, 11 Sep 2009 06:34:36 GMT
Author: noble
Date: Fri Sep 11 06:34:35 2009
New Revision: 813676

URL: http://svn.apache.org/viewvc?rev=813676&view=rev
Log:
SOLR-1421 FieldreaderDataSource uses a stale Variableresolver

Modified:
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java?rev=813676&r1=813675&r2=813676&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java
Fri Sep 11 06:34:35 2009
@@ -271,6 +271,14 @@
     contextCopy = null;
   }
 
+  public VariableResolverImpl getVariableResolver() {
+    return resolver;
+  }
+
+  public Context getContext() {
+    return context;
+  }
+
   @Override
   public void close() {
     delegate.close();

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java?rev=813676&r1=813675&r2=813676&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java
Fri Sep 11 06:34:35 2009
@@ -52,16 +52,17 @@
   protected VariableResolver vr;
   protected String dataField;
   private String encoding;
+  private EntityProcessorWrapper entityProcessor;
 
   public void init(Context context, Properties initProps) {
-    vr = context.getVariableResolver();
     dataField = context.getEntityAttribute("dataField");
     encoding = context.getEntityAttribute("encoding");
+    entityProcessor = (EntityProcessorWrapper) context.getEntityProcessor();
     /*no op*/
   }
 
   public Reader getData(String query) {
-    Object o = vr.resolve(dataField);
+    Object o = entityProcessor.getVariableResolver().resolve(dataField);
     if (o == null) {
        throw new DataImportHandlerException (SEVERE, "No field available for name : " +dataField);
     }



Mime
View raw message