Find file
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (39 sloc) 2.83 KB
Compatible With:
Nutch 1.3
For the latest information about Nutch, please visit the website at:
our the wiki, at:
To get started using Nutch read Tutorial:
For the latest information about elastic search, please visit the website at:
our the wiki, at:
To get started using Mongodb and Java read these Tutorials
Important Stuff
This patch was created to allow for the indexing of Nutch crawl data directly into elasticsearch. This is similar in nature to that of the SolrIndexer that comes with Nutch which let you index directly into Solr. This provides a way directly index data into elasticsearch coming directly from Nutch.
This is just the code necessary to create the solution. You must start by having the Nutch codebase and have it setup in your development environment (Eclipse) see for how do this. Once you are set up and is working well. You are ready to get started. The following files below are necessary to integrate into the notch base and then re-build notch.
In order to run this you need a working copy of the Nutch source and access to a elasticsearch environment.
Folder Structure
----> java/org/apache/nutch/indexer/elasticsearch/
----> java/org/apache/nutch/indexer/elasticsearch/
----> java/org/apache/nutch/indexer/elasticsearch/
----> ivy/ivy.xml
Step 1. Create a new package called "" and place the the files "", "" and "" in the package
Step 2. Modify your ivy configuration. Open the ivysettings.xml and ivy.xml and add the elastic search java driver information to the existing ivy/ivysettings.xml and ivy/ivy.xml files.
Step 3. Rebuild and you should be ready to test
Step 4. To test you can run the following commands from terminal
Make sure you have seeded your crawl db with URLs
----> bin/nutch org.apache.nutch.indexer.elasticsearch.Elasticsearch localhost 9302 crawl/crawldb crawl/linkdb crawl/segments/*
To see the available parameters
localhost - is the location of your mongodb database (used to connect)
port - is the port location of your elastic search server
crawldb - location of your crawled
linkdb - location of your linkdb
segments - location of your segments
----> Once you verified there are no errors, you can test to see if you can access "http://localhost:9200/nutch/index/_search?q=*"