i have implemented this works indexing document at first index (core0) http://localhost:8983/solr/core0/update/extract/?stream.file=path_of_filename&commit=true<http://localhost:8983/solr/core1/admin/>
indexing document at first index (core) http://localhost:8983/solr/core1/update/extract/?stream.file=path_of_filename&commit=true<http://localhost:8983/solr/core1/admin/> On Thu, Mar 31, 2011 at 4:28 PM, Amel Fraisse <a...@imaginatio.fr> wrote: > > > 2011/3/31 Deepak Singh <deep...@praumtech.com> > >> >> I want 2 index in same solr server. >> How to create 2 index and its schema for two different search result >> >> Hi, >> > > You have to use SolrCore to create a solr.xml file in wich you specify 2 > cores ( refer to the link : http://wiki.apache.org/solr/CoreAdmin ) > > But for indexing and searching I've the same question: I don't know how I > could specify that document would be indexed a twice (in the first index and > in the second index). > > Amel. > >> >> On Wed, Mar 30, 2011 at 7:07 PM, Amel Fraisse <amel.frai...@gmail.com>wrote: >> >>> Hello every body, >>> >>> referring to the link : http://wiki.apache.org/solr/CoreAdmin. >>> >>> I've created a solr.xml file as follows: >>> >>> <solr persistent="true" sharedLib="lib"> >>> <property name="snapshooter" value="/home/solr-user/solr/ >>> bin/snapshooter.sh" /> >>> <cores adminPath="/admin/cores" shareSchema="false" >>> adminHandler="fr.splayce.solr.handler.MyAdminHandler"> >>> <core name="core1" instanceDir="core0"> >>> <property name="dataDir" value="/core0/data" /> >>> </core> >>> <core name="core2" instanceDir="core1"/> >>> <property name="dataDir" value="/core1/data" /> >>> </cores> >>> </solr> >>> >>> So before using SolrCore I instanciated a SolrServer to index and search >>> documents as follows: >>> >>> System.setProperty("solr.solr.home", "solr"); >>> CoreContainer.Initializer initializer = new >>> CoreContainer.Initializer(); >>> CoreContainer coreContainer = initializer.initialize(); >>> server = new EmbeddedSolrServer(coreContainer, ""); >>> >>> And then to index a document : server.add(doc) and to search : >>> server.query(...). >>> >>> So with SolrCore I've create MyAdminHandler by overrinding >>> handleCistomAction method like this (as mentionned in the link): >>> >>> protected boolean handleCustomAction(SolrQueryRequest req, >>> SolrQueryResponse >>> rsp) { >>> CoreContainer container = super.getCoreContainer(); >>> SolrCore mycore1 = container.getCore("core1"); >>> SolrCore mycore2 = container.getCore("core2"); >>> >>> So how I could index and search document within the 2 indexes? >>> >>> Thank you for your help. >>> >>> >>> 2011/3/29 Rahul Warawdekar <rahul.warawde...@gmail.com> >>> >>> > Please refer >>> > http://wiki.apache.org/solr/MultipleIndexes >>> > >>> > On 3/29/11, Amel Fraisse <amel.frai...@gmail.com> wrote: >>> > > Hello every body, >>> > > >>> > > Is it possible to create 2 index within the same Solr server ? >>> > > >>> > > Thank you. >>> > > >>> > > Amel. >>> > > >>> > >>> > >>> > -- >>> > Thanks and Regards >>> > Rahul A. Warawdekar >>> > >>> >> >> > > > -- > *Amel Fraisse* > > *Imaginatio SAS* > *128 rue la Boétie > 75008 PARIS > Bureaux : 12 rue Martel - 75010 PARIS* > http://compta.splayce.com > > >