Data Import Handler
Can be from the database, webpage address such as Sword Jiven file.
Can be added in full amount, also support incremental add (only add modified content)
With Dih, you need 3 steps of important configuration.
First, add the jar packages that are used to the solrconfig.
<lib dir= ". /.. /.. /contrib/dataimporthandler/lib "regex=". *\.jar "/>
<lib dir= ". /.. /.. /dist/"regex=" Solr-dataimporthandler-.*\.jar "/>
Second, configure the DataImport request processor in the Solrconfig
<requesthandler name= "/dataimport"
class= "Org.apache.solr.handler.dataimport.DataImportHandler" >
<lst name= "Defaults" >
<str name= "config" >data-config.xml</str>
</lst>
</requestHandler>
Finally, a configuration file for Dih is provided with a data import. The above is defined as Data-config.xml, and the directory is a relative directory of conf/.
This file contains references to all data sources, as well as steps to convert the data to a document. Support for multiple data sources, complex conversion logic (including scripting languages that support operations to import data)
See SOLR wiki for specific content
Http://wiki.apache.org/solr/DataImportHandler
************************************************************************************************
* Example of starting Dih
BIN/SOLR-E Dih
Related terms:
Datasource: Data source. For example, the database to provide a database connection, user name and password
Entity: Entities are used to generate documents, the entity of the database is the table
Processor: The entity processor is used to extract data, turn it into a document, and add an index. Supports user-defined processor.
Transformer: Converter. Enables customization by changing fields, creating new fields, generating multiple documents from one line, and more.
Example: Example of DB in Example-dih.
The configuration file is a database conversion configuration for the <dataConfig> tag, which can be used as a parameter to the DIH processor.
Dih request sent to SOLR via HTTP request
Parameters for full-amount submissions
Property Writer
An optional configuration for the Dih configuration file that defines the date format and location information. See the documentation.
*entity processors entity processor, see document for specific parameters
SOLR Database import data import Handler