How to Configure Apache Solr to run with Multiple Cores

This tutorial assumes that you are running Apache Solr on Jetty Web Server, and have both set up in the same manner as described in the following tutorials:

How to Install Jetty Web Server in Ubuntu

How to Install Apache Solr in Ubuntu

Edit solr.xml

cd /opt/jetty/solr
sudo gedit solr.xml

If you haven't done any modifications to your current solr.xml file, then use the following as a template:


<?xml version="1.0" encoding="UTF-8" ?>
<!--
All (relative) paths are relative to the installation path

persistent: Save changes made via the API to this file
sharedLib: path to a lib directory that will be shared across all cores
-->
<solr persistent="false">

<!--
adminPath: RequestHandler path to manage cores.
If 'null' (or absent), cores will not be manageable via request handler
-->
<cores adminPath="/admin/cores">
<core name="core0" instanceDir="./cores/core0" />
<core name="core1" instanceDir="./cores/core1" />
</cores>
</solr>

Edit solrconfig.xml

cd /opt/jetty/solr/conf
sudo gedit solrconfig.xml

Change the following:

<dataDir>${solr.data.dir:./solr/data}</dataDir>

To:

<dataDir>${solr.data.dir:./data}</dataDir>

Create cores directory

cd /opt/jetty/solr
sudo mkdir cores

Create first core directory

cd /opt/jetty/solr/cores
sudo mkdir core0
cd core0
sudo mkdir data
sudo chown -R jetty:jetty data

Copy over configuration files

cd /opt/jetty/solr
sudo cp -R conf cores/core0/conf

Create second core directory

cd /opt/jetty/solr/cores
sudo cp -R core0 core1

Restart Jetty

sudo /etc/init.d/jetty restart

If all is well, you should be able to access the admin page for each core at the following URLs:

core0 (admin)

core1 (admin)


The query URL works similarly:

core0 (query URL)

core1 (query URL)

How to Be: A Manifesto for Being a Decent Human Being

We are all human beings. We are in this together. We should never forget that.

This is a short list of things we value to help us remember:

Accepting responsibility over Passing blame onto others

Voicing your opinion over Staying silent

Sharing knowledge freely over Hording it for yourself

Offering an empathetic ear over Pretending to listen

Helping your fellow humans over Looking out only for yourself

Sticking up for a friend over Fear

Forgiving when forgiveness is earned over Holding grudges

Trying to better yourself over Thinking you don't need to

That is to say, the things on the left should be valued over the things on the right.

This list is in no ways perfect. It is simply a list of things that I have personally experienced in recent months, and felt the need to spew into written form. If this list inspires you in any small way, great.

Please remember, that everyone is deserving of at least a chance to enjoy life. No one is perfect. We are all just trying to figure things out.

How to Configure the Default Search in Chrome to use secure HTTP

If you're a big fan of using secure HTTP as much as possible, you might have already thought about how to use the encrypted version of Google search as the default search in your address bar. Here's how you do it:

Go to this address in Chrome:

chrome://settings/searchEngines

At the bottom of this page is where you'll "Add a new search engine."

In the first box, put the name of the new Search Engine:

Google (secure)

In the second box, put the keyword for the new Search Engine:

google.com (secure)

Enter the following URL in the third box:

https://encrypted.google.com/search?{google:RLZ}{google:acceptedSuggestion}{google:originalQueryForSuggestion}sourceid=chrome&ie={inputEncoding}&q=%s

And finally, you'll need to make the search engine you just added your default. Simply mouse over the new search engine in the list, and click "Make Default."

Now to test it, open up a new tab and enter a test search query. If all is well, you should see the results of your search on encrypted Google.

Be the Gate Keeper of Your Personal Data

Creeped out by just how much companies know about you? Maybe you heard about how Target figured out a teenage girl was pregnant before her own father. Or maybe you've found the ads on the websites you visit to be a little too specific. Or maybe you've heard about the seemingly endless stream of major security breaches involving hundreds of thousands of detailed customer records:

Think for a moment just how much information you give to these companies. How many companies know where you live? How many companies have your phone number? How many companies have your credit card or bank account information? Are those companies selling all or some of that data to other companies? And what are the odds any of those companies could suffer a security breach that could expose your personal information? Odds are some of your personal information has already fallen into the hands of criminals who could use it to do any number of nasty things:

  • Steal your identity
  • Make fraudulent purchases on your credit cards
  • Take funds directly from your bank accounts
  • Target you with sophisticated phishing scams

What You Can Do

All that being said, there are things you can do to protect yourself. If you are a Google Chrome user, there is a great extension you can install to prevent third parties from tracking you: Disconnect. You can also use secure HTTP when viewing sites like Facebook and Google. Here's a good article explaining why you should use secure HTTP:

Web Security: Why You Should Always Use HTTPS

To ensure you stay on secure HTTP when viewing Facebook, you should enable "Secure Browsing" under Account Settings -> Security from within your Facebook account.

All that tech stuff aside.. The single most important thing you can do to protect yourself is to be mindful of the information you give to companies; whether online or off.