Ok. Thanks for the clarification. Regards, Edwin
On 3 September 2017 at 00:52, Erick Erickson <erickerick...@gmail.com> wrote: > Ah, my mistake. > > The merge tool apparently has to lock the index, which actually makes > sense. > > Best, > Erick > > On Sat, Sep 2, 2017 at 9:08 AM, Zheng Lin Edwin Yeo > <edwinye...@gmail.com> wrote: > > Hi Erick, > > > > Thanks for your reply. > > > > However, I get this error when I tried to run the IndexMergeTool when > Solr > > is running. But the merge is successful when I stop Solr. > > What could be the reason? > > > > Merging... > > Exception in thread "main" > > org.apache.lucene.store.LockObtainFailedException: Lock held by another > > program: > > C:\solr\collection1_shard1_replica1\data\index. > 20170713083232277\write.lock > > at > > org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLock > > Factory.java:118) > > at > > org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:4 > > 1) > > at > > org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:4 > > 5) > > at > > org.apache.lucene.store.FilterDirectory.obtainLock(FilterDirectory.ja > > va:104) > > at > > org.apache.lucene.index.IndexWriter.acquireWriteLocks(IndexWriter.jav > > a:2571) > > at > > org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:2629) > > > > at > > org.apache.lucene.misc.IndexMergeTool.main(IndexMergeTool.java:54) > > > > > > Regards, > > Edwin > > > > On 1 September 2017 at 22:51, Erick Erickson <erickerick...@gmail.com> > > wrote: > > > >> You don't have to stop solr to run the merge index tool. I would, > >> however, stop _indexing_ to that Solr instance. > >> > >> And you probably have to reload the core (or restart the collection) > >> afterwards to pick up the merged documents. > >> > >> Best, > >> Erick > >> > >> On Fri, Sep 1, 2017 at 6:46 AM, Zheng Lin Edwin Yeo > >> <edwinye...@gmail.com> wrote: > >> > Hi, > >> > > >> > Just to check, are we able to run the IndexMergeTool on the index > that is > >> > still running on Solr? Or do we have to stop Solr first before running > >> the > >> > IndexMergeTool? > >> > > >> > Regards, > >> > Edwin > >> > > >> > On 26 August 2017 at 23:41, Zheng Lin Edwin Yeo <edwinye...@gmail.com > > > >> > wrote: > >> > > >> >> Thanks for pointing out the mistake. The script can run after I > correct > >> >> the ":" to ";". > >> >> > >> >> However, I am getting the following error now. > >> >> > >> >> Merging... > >> >> Exception in thread "main" org.apache.lucene.index. > >> IndexNotFoundException: > >> >> no se > >> >> gments* file found in HardlinkCopyDirectoryWrapper(MMapDirectory@C > >> :\solr\ > >> >> collection1_shard1_replica1\data\in > >> >> dex lockFactory=org.apache.lucene.store.NativeFSLockFactory@ > 1ff8b8f): > >> >> files: [wr > >> >> ite.lock] > >> >> at org.apache.lucene.index.SegmentInfos$FindSegmentsFile. > >> >> run(SegmentInfo > >> >> s.java:687) > >> >> at org.apache.lucene.index.SegmentInfos$FindSegmentsFile. > >> >> run(SegmentInfo > >> >> s.java:644) > >> >> at org.apache.lucene.index.SegmentInfos.readLatestCommit( > >> >> SegmentInfos.ja > >> >> va:450) > >> >> at org.apache.lucene.index.IndexWriter.addIndexes( > >> >> IndexWriter.java:2653) > >> >> > >> >> at org.apache.lucene.misc.IndexMergeTool.main( > >> >> IndexMergeTool.java:54) > >> >> > >> >> > >> >> This was done after I have stop Solr. What could be the issue here? > >> >> > >> >> Regards, > >> >> Edwin > >> >> > >> >> On 26 August 2017 at 08:42, Leonardo Perez Pulido < > >> >> leoperezpul...@gmail.com> wrote: > >> >> > >> >>> Hi, > >> >>> Isn't the Windows classpath separator a semi-colon? Like this: > >> >>> cene-core-6.5.1.jar"*;*"C:solr/serve > >> >>> Just saying. > >> >>> Regards. > >> >>> > >> >>> On Fri, Aug 25, 2017 at 8:33 PM, Zheng Lin Edwin Yeo < > >> >>> edwinye...@gmail.com> > >> >>> wrote: > >> >>> > >> >>> > Hi Erick, > >> >>> > > >> >>> > Thanks for your reply. > >> >>> > I have check, it was not due to the typo. The same error occurs > even > >> >>> with > >> >>> > the slash. > >> >>> > > >> >>> > Regards, > >> >>> > Edwin > >> >>> > > >> >>> > On 26 August 2017 at 05:16, Erick Erickson < > erickerick...@gmail.com> > >> >>> > wrote: > >> >>> > > >> >>> > > You classpath is not correct. Unless it's a typo, > >> >>> > > :"C:solr/server/solr-webapp/webapp/WEB-INF/lib/lucene- > >> misc-6.5.1.jar" > >> >>> > > is wrong, it should be: > >> >>> > > "C:/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-misc- > >> >>> 6.5.1.jar", > >> >>> > > note the slash before "solr". > >> >>> > > > >> >>> > > If that's not just a typo you need to look further as to why the > >> >>> > > classpath isn't being specified correctly. > >> >>> > > > >> >>> > > Best, > >> >>> > > Erick > >> >>> > > > >> >>> > > On Thu, Aug 24, 2017 at 7:52 PM, Zheng Lin Edwin Yeo > >> >>> > > <edwinye...@gmail.com> wrote: > >> >>> > > > Hi, > >> >>> > > > > >> >>> > > > I am trying to use the IndexMergeTool to merge two indexes > that > >> are > >> >>> > > indexed > >> >>> > > > in different collections into one. Both collections have the > same > >> >>> > fields, > >> >>> > > > and are using Parent-Child Block-Join. > >> >>> > > > > >> >>> > > > When I tried to run the following command as stated from the > Solr > >> >>> Wiki > >> >>> > > > https://cwiki.apache.org/confluence/display/solr/ > Merging+Indexes > >> >>> > > > > >> >>> > > > java -cp > >> >>> > > > "C:/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene- > >> >>> > > core-6.5.1.jar":"C:solr/server/solr-webapp/webapp/WEB- > >> >>> > > INF/lib/lucene-misc-6.5.1.jar" > >> >>> > > > org/apache/lucene/misc/IndexMergeTool > >> >>> > > > C:/solr/collectionMerge_shard1_replica1/data/index > >> >>> > > > C:/solr/collection1_shard1_replica1/data/index > >> >>> > > > C:/solr/collection2_shard1_replica1/data/index > >> >>> > > > > >> >>> > > > I get the following error: > >> >>> > > > Error: Could not find or load main class > >> >>> > > > org.apache.lucene.misc.IndexMergeTool > >> >>> > > > > >> >>> > > > What could be causing the error? > >> >>> > > > > >> >>> > > > This is done on Solr 6.5.1 > >> >>> > > > > >> >>> > > > Regards, > >> >>> > > > Edwin > >> >>> > > > >> >>> > > >> >>> > >> >> > >> >> > >> >