WELCOME!

What is Pinoy? It's a slang for Filipino, a person who comes from the Republic of the Philippines, or commonly known as the Philippine Islands (PI). I am a Filipino and works as an Oracle DBA in the United States. Whenever an issue arises or just for experiments, I usually forget what I did to solve/conduct them. There must be a central location where I can put everything. Thus, this blog was born. It's a collection of ideas, tips and tricks, scripts, or anything interesting that happened to me on an Oracle database or any other stuff.

The simpler, the better! has always been my motto. You don't have to complicate things. Simple things, for me, is always easier, just like my site.

FYI, anything that is written here is based on my personal experiences and is not endorsed by any other party. Also, I will not be held liable for issues that can arise by following whatever I did. Just like any other good DBA would say... ALWAYS TEST!

Hope you can find this site helpful in whatever you need and remember, I am not a guru.

May 6, 2011

SOLR: Adding a new core

One of my clients' requirement is to have separate indexes for different on-line classified ad searches. The way to do is to have SOLR configured as a multi-core environment. To accomplish this, the steps that I did were the following. Schema definitions are the same in all the cores.

  
  
1. Create the appropriate directories. Let's assume that the data directory is under /solrdata.
% mkdir -p /solrdata/core2/conf /solrdata/core2/data
2. Copy the conf directory from the existing core
% cp /solrdata/core1/conf/* /solrdata/core2/conf
3. Create a solr.xml file in the SOLR_HOME directory with the following:

4. Since the dataDir property is already defined in the solr.xml file, we need to comment out the  dataDir element in <INSTANCE_DIR>/conf/solrconfig.xml. It will look something like this:

5. Restart SOLR. The new cores should be listed in http://<hostname>:<port>/solr

6 comments:

  1. Thanks for this post. Was very helpful.

    sukeshnambiar@indiatimes.com

    ReplyDelete
  2. Thank you, this helped me!
    Cheers!

    ReplyDelete
  3. Great work, Your tutorial it's good for me, thank you

    ReplyDelete
  4. I'm a pinoy too. Not too many of us in the IT field.

    ReplyDelete
  5. can you please guide me how i can create the indexing files using DIH in the core0 and core1

    ReplyDelete
  6. useful post. thanks! just add a closing tag for cores element

    ReplyDelete