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] Trivial Update of "DataImportHandler" by FergusMcMenemie
Date Thu, 20 May 2010 18:27:05 GMT
Dear Wiki user,

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

The "DataImportHandler" page has been changed by FergusMcMenemie.
The comment on this change is: last of the ! char changes.
http://wiki.apache.org/solr/DataImportHandler?action=diff&rev1=245&rev2=246

--------------------------------------------------

   * You can put a script tag inside the ''dataConfig'' node. By default, the language is
assumed to be Javascript. In case you're using another language, specify on the script tag
with attribute `'language="MyLanguage"'` (must be supported by java 6)
   * Write as many transformer functions as you want to use. Each such function must accept
a ''row'' variable corresponding to ''Map<String, Object>'' and return a row (after
applying transformations)
   * To remove entries from the row use row.remove(keyname);
-  * To add multiple entries for a single field use var arr = new java.util.ArrayList(), you
can't use a JavaScript array.
+  * To add multiple entries for a single field use var arr = new java.util.!ArrayList(),
you can't use a !JavaScript array.
   * Documentation for the Java Map object [[http://java.sun.com/javase/6/docs/api/java/util/Map.html|Java
6 Map]]
-  * Documentation for the Java ArrayList object [[http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html|Java
6 ArrayList]]
+  * Documentation for the Java !ArrayList object [[http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html|Java
6 ArrayList]]
   * Make an entity use a function by specifying ''transformer="script:<function-name>"''
in the ''entity'' node.
   * In the above data-config, the javascript function ''f1'' will be executed once for each
row returned by entity e.
   * The semantics of execution is same as that of a java transformer. The method can have
two arguments as in 'transformRow(Map<String,Object> , Context context) in the abstract
class 'Transformer' . As it is javascript the second argument may be omittted and it still
works.
@@ -766, +766 @@

   * '''`newerThan`''' : A date param . Use the format (`yyyy-MM-dd HH:mm:ss`) . It can also
be a datemath string eg: ('NOW-3DAYS'). The single quote is necessary . Or it can be a valid
variableresolver format like (${var.name})
   * '''`olderThan`''' : A date param . Same rules as above
   * '''`rootEntity`''' :It must be false for this (Unless you wish to just index filenames)
An entity directly under the <document> is a root entity. That means that for each row
emitted by the root entity one document is created in Solr/Lucene. But as in this case we
do not wish to make one document per file. We wish to make one document per row emitted by
the following entity 'x'. Because the entity 'f' has rootEntity=false the entity directly
under it becomes a root entity automatically and each row emitted by that becomes a document.
-  * '''`dataSource`''' :If you use Solr1.3 It must be set to "null" because this does not
use any DataSource. No need to specify that in Solr1.4 .It just means that we won't create
a DataSource instance. (In most of the cases there is only one !DataSource (A !JdbcDataSource)
and all entities just use them. In case of !FileListEntityProcessor a !DataSource is not necessary.)
+  * '''`dataSource`''' :If you use Solr1.3 It must be set to "null" because this does not
use any !DataSource. No need to specify that in Solr1.4 .It just means that we won't create
a !DataSource instance. (In most of the cases there is only one !DataSource (A !JdbcDataSource)
and all entities just use them. In case of !FileListEntityProcessor a !DataSource is not necessary.)
  
  example:
  {{{
@@ -850, +850 @@

          >
     ...
  }}}
- While there are use cases where you might need to create a solr document per line read from
a file, it is expected that in most cases that the lines read will consist of a pathname which
is in turn consumed by another EntityProcessor
+ While there are use cases where you might need to create a solr document per line read from
a file, it is expected that in most cases that the lines read will consist of a pathname which
is in turn consumed by another !EntityProcessor
  such as XPathEntityProcessor.
  
  == DataSource ==
@@ -911, +911 @@

  === ContentStreamDataSource ===
  <!> [[Solr1.4]]
  
- Use this to use the POST data as the DataSource. This can be used with any !EntityProcessor
that uses a !DataSource<Reader>
+ Use this to use the POST data as the !DataSource. This can be used with any !EntityProcessor
that uses a !DataSource<Reader>
  
  == EventListeners ==
  !EventListener can be registered for "onImportStart" and onImportEnd" .It must implement
the interface  [[http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EventListener.java?view=markup|EventListener]].

Mime
View raw message