Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by NoblePaul: http://wiki.apache.org/solr/DataImportHandler The comment on the change is: Special commands ------------------------------------------------------------------------------ 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/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/EventListener.java?view=markup EventListener]. + {{{ + <dataConfig> + <document onImportStart ="com.FooStart" onImportEnd="comFooEnd"> + .... + </document> + </dataConfig> + }}} - == Boosting , Skipping documents == - It is possible to decide in the runtime to skip or boost a particular document. + == Special Commands == + Special commands can be given to DIH by adding certain variables to the row returned by any of the components . + * '''`$skipDoc`''' : Skip the current document . Do not add it to Solr. The value can be String true/false + * '''`$skipRow`''' : Skip the current row. The document will be added with rows from other entities. The value can be String true/false + * '''`$docBoost`''' : Boost the current doc. The value can be a number or the toString of a number + * '''`$deleteDocById`''' : Delete a doc from Solr with this id. The value hast to be the unniqueKey value of the document + * '''`$deleteDocByQuery`''' :Delete docs from Solr by this query. The value must be a Solr Query - Write a custom Transformer to add a value '''$skipDoc''' with a value 'true' to skip that document. To boost a document with a given value add '''$docBoost''' with the boost value == Adding datasource in solrconfig.xml == [[Anchor(solrconfigdatasource)]]
