• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Integrating Apache Nutch With Apache Solr on Ubuntu Server

By Abhishek Ghosh June 14, 2018 6:55 pm Updated on June 14, 2018

Integrating Apache Nutch With Apache Solr on Ubuntu Server

Advertisement

In our previous tutorials, we written the steps to install Apache Nutch on Ubuntu Server and also how to install Apache Solr on Ubuntu Server. Integrating Apache Nutch With Apache Solr Will Offer a Web UI, Options to Visually Search and Use Extended Functions of Apache Nutch. Our guide on installing Apache Solr uses older version of Solr (at present). We are using Apache Nutch 1.x – in previous articles we discussed that Apache Nutch 1.x and Apache Nutch 2.x has difference and practically they are kind of “different software”.

 

Integrating Apache Nutch With Apache Solr

 

You must read our previous guides to understand what we are talking about. The seed URLs file we created named seed.txt under urls/ directory, if has following content :

Vim
1
http://nutch.apache.org/

Then we can configure Regular Expression Filters by opening the file conf/regex-urlfilter.txt with our needed regex, like :

Advertisement

---

Vim
1
+^https?://([a-z0-9-]+\.)*nutch\.apache\.org/

That is for limiting crawl, adding logic of crawl etc. Download DMOZ RDF dump from somewhere (DMOZ officially closed), it has zillions of URLs. If that RDF dump’s name is content.rdf.u8.gz, then do these steps (we already shown these kind of steps in earlier guides) :

Vim
1
2
3
4
5
mkdir dmoz
bin/nutch org.apache.nutch.tools.DmozParser content.rdf.u8 -subset 5000 > dmoz/urls
bin/nutch inject crawl/crawldb dmoz
bin/nutch inject crawl/crawldb urls
bin/nutch generate crawl/crawldb crawl/segments

We ended the Nutch guide after the above step explaining segments. Here are advanced steps :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
s1=`ls -d crawl/segments/2* | tail -1`
echo $s1
Now we run the fetcher on this segment with:
 
bin/nutch fetch $s1
Then we parse the entries:
 
bin/nutch parse $s1
When this is complete, we update the database with the results of the fetch:
 
bin/nutch updatedb crawl/crawldb $s1
Now the database contains both updated entries for all initial pages as well as new entries that correspond to newly discovered pages linked from the initial set.
Now we generate and fetch a new segment containing the top-scoring 1,000 pages:
 
bin/nutch generate crawl/crawldb crawl/segments -topN 1000
s2=`ls -d crawl/segments/2* | tail -1`
echo $s2
bin/nutch fetch $s2
bin/nutch parse $s2
bin/nutch updatedb crawl/crawldb $s2
bin/nutch generate crawl/crawldb crawl/segments -topN 1000
s3=`ls -d crawl/segments/2* | tail -1`
echo $s3
bin/nutch fetch $s3
bin/nutch parse $s3
bin/nutch updatedb crawl/crawldb $s3
bin/nutch invertlinks crawl/linkdb -dir crawl/segments

We already have Apache Solr installed, take that installation is at $HOME/apache-solr, which we can refer as ${APACHE_SOLR_HOME}.

create resources for a new Nutch Solr core :

Vim
1
cp -r ${APACHE_SOLR_HOME}/server/solr/configsets/basic_configs ${APACHE_SOLR_HOME}/server/solr/configsets/nutch

Copy the Nutch’s schema.xml into the conf directory :

Vim
1
cp ${NUTCH_RUNTIME_HOME}/conf/schema.xml ${APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf

There should not be managed-schema :

Vim
1
rm ${APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf/managed-schema

Now, start the Solr server :

Vim
1
${APACHE_SOLR_HOME}/bin/solr start

Create the nutch core :

Vim
1
${APACHE_SOLR_HOME}/bin/solr create -c nutch -d server/solr/configsets/nutch/conf/

Add the core name to the Solr server URL in Nutch’s configaration file :

Vim
1
-Dsolr.server.url=http://localhost:8983/solr/nutch

Now, we can pass through reverse proxy for server to reach the front-end which for localhost is at URL :

Vim
1
http://localhost:8983/solr/#/

We can run commands like :

Vim
1
bin/nutch dedup http://localhost:8983/solr

We can run a crawl with Nutch and index the data in Solr. Using the same seed list :

Vim
1
bin/crawl -i -D solr.server.url=http://localhost:8983/solr/nutchCore -s urls crawl 2

Integrating Apache Nutch With Apache Solr on Ubuntu Server

After the crawl, the data will be indexed in Solr. We can view it via Solr webUI. Go to http://localhost:8983/solr, load the nutchCore, on left hand side of panel, click on Query to search documents in the indexed data. *:*. That return things indexed by Solr.

Tagged With -Dsolr server url , apache nutch crawl email , integrating nutch and solr when they are insatlled on different servers\ , nutch with solr , side nutch cameras , using nutch and solr
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Integrating Apache Nutch With Apache Solr on Ubuntu Server

  • Install Apache Nutch (Web Crawler) on Ubuntu Server

    Aache Nutch is a Production Ready Web Crawler. Nutch Can Be Extended With Apache Tika, Apache Solr, Elastic Search, SolrCloud, etc. Here is How to Install Apache Nutch on Ubuntu Server.

  • How To Install Apache Solr 6.x on Ubuntu 16.04

    Here is How To Install Apache Solr 6.x on Ubuntu 16.04. Apache Solr Search Platform Can Be Integrated With WordPress, CMS & Other Softwares.

  • Difference Between Apache Solr and Apache Lucene

    One user have installation guide for Apache Solr but we do not have guide for Apache Lucene. It is kind of deliberate omission. There is an easy way to use Lucence on the command line. In most of the situations possibly you’ll use Apache Solr and when you’ll realize the need to utilize Apache Lucene, […]

  • DMOZ Listing Guidelines and How To Get Listed in DMOZ

    DMOZ Listing Guidelines are not very clear to many webmasters. Read from DMOZ Meta Editor how to get listed in DMOZ and why you should never pay anyone for it.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy