You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2007/04/20 00:41:22 UTC
[Solr Wiki] Update of "MultipleIndexes" by ryan
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by ryan:
http://wiki.apache.org/solr/MultipleIndexes
New page:
= Running Multiple Indexes =
As it stands, solr supports a single index for each instance.
If you need to run multiple indexes, you will need to run multiple webapps. See:
* [http://wiki.apache.org/solr/SolrTomcat#head-ef0d6d9640b6f25a242a915d57e0709630915040 Tomcat]
* [http://wiki.apache.org/solr/SolrTomcat#head-231b06a53a52e19d5d0d06d42a907efa095be698 Jetty]
* [http://wiki.apache.org/solr/SolrTomcat#head-8fccdfdea933273fd65c1dfa2a59979fc162d566 Resin]
In many cases where it feels like multiple indexes are needed, the same effects can be accomplished in a single index with an additional field to select what type you are searching for. Consider the case where you want to index books and movies.
For a book you may need:
* title
* author
* release (date)
For a movie you would need:
* title
* director
* release (date)
You can design a single SchemaXml to handle both object types.
{{{
<!-- this will be "book" or "movie" -->
<field name="type" ... />
<field name="title" ... />
<field name="author" ... />
<field name="director" ... />
<field name="release " ... />
}}}
To search for just books or movies you can add "+type:book" to your query.