• 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

This Article Has Been Shared 332 Times!

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

  • Installing Apache Airflow On Ubuntu, CentOS Cloud Server

    Airflow Authors, Schedules, Monitors Workflows. Here Are The Steps For Installing Apache Airflow On Ubuntu, CentOS Running On Cloud Server.

  • How To Install Hue on Ubuntu 16.04

    Hue is Query Tool With GUI For Browsing, Querying, Visualizing Data & Developing Apps for Hadoop. Here is How To Install Hue on Ubuntu 16.04.

  • Big Data Analytics Solutions: On-Premise versus in the Cloud

    Objective of this article Big Data analytics solutions on-premise versus in the cloud is not limited to comparing on-premise & in the cloud.

  • Getting Started with Microservices

    Here is a Brief Getting Started with Microservices Article in Plain English for the Readers Who are Not Sure What Microservices are.

  • Install Bokeh Python Visualization Library in Jupyter Notebooks

    With Bokeh You Can Create Interactive Tables and Charts. Here is How to Install Bokeh Python Visualization Library in Jupyter Notebooks.

Additionally, 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 (22.1K 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

  • FaaS Versus PaaS Deployment: What You Should Know May 18, 2022
  • What Is A Digital Media Consultancy? May 17, 2022
  • How Artificial Intelligence (AI) Is Changing The Way We Play Bingo May 16, 2022
  • Why You Need A Big Data Consultant May 15, 2022
  • The Connection Between AI And Online Slots May 13, 2022

About This Article

Cite this article as: Abhishek Ghosh, "Integrating Apache Nutch With Apache Solr on Ubuntu Server," in The Customize Windows, June 14, 2018, May 19, 2022, https://thecustomizewindows.com/2018/06/integrating-apache-nutch-with-apache-solr-on-ubuntu-server/.

Source:The Customize Windows, JiMA.in

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Privacy Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

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

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