You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by depsi programmer <de...@yahoo.com> on 2006/03/30 15:57:05 UTC

Compound Indexes Problem

Hello,
  I am using lucene for storing details of my students. I have used 
  SetUseCompoundFile(True) and optimised the indexes. Now I am not able to convert them back to their original form
  Thanks in advance
  Depsi

		
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

Re: Compound Indexes Problem

Posted by Raghavendra Prabhu <rr...@gmail.com>.
Does changing the merge factor

and setting the options to SetUseCompoundfile(false)

split a  single index into multiple pieces.

Even i have been doing something similar and would like to know how it is
done

Rdgs
Prabhu


On 3/31/06, depsi programmer <de...@yahoo.com> wrote:
>
> Hello,
> Thanks for your responce.
> can you please guide me on how to break this single index into multiple
> pieces. when I try to do so it corrupts the index.
> I had created a index with max merge docs set to 10,000 with set compound
> indexes set to true. now I called optimize with max merge docs set to 100
> and the index was curropted
> Thanks
> Depsi
>
> Dennis Kubes <nu...@dragonflymc.com> wrote: According to the Lucene In
> Action book you can convert from one compound to
> multi-file and vice versa by setting the setCompoundFile method to true or
> false.  But in running this myself I found that while I can convert from
> multi-file to compound, it doesn't convert back.  Here is the code that I
> used.
>
>    try {
>      System.setProperty("org.apache.lucene.lockDir",
> "lock-directory-path-here");
>      String idxDir = "index-directory-path-here";
>      IndexWriter writer = new IndexWriter(idxDir, new StandardAnalyzer(),
> false);
>      writer.setUseCompoundFile(false);
>      writer.optimize();
>      writer.close();
>    }
>    catch (IOException e) {
>      // TODO Auto-generated catch block
>      e.printStackTrace();
>    }
>
> Dennis
>
> -----Original Message-----
> From: depsi programmer [mailto:depsi_programmer@yahoo.com]
> Sent: Thursday, March 30, 2006 7:57 AM
> To: java-user@lucene.apache.org
> Subject: Compound Indexes Problem
>
> Hello,
> I am using lucene for storing details of my students. I have used
> SetUseCompoundFile(True) and optimised the indexes. Now I am not able to
> convert them back to their original form
> Thanks in advance
> Depsi
>
>
> ---------------------------------
> New Yahoo! Messenger with Voice. Call regular phones from your PC and save
> big.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger's low  PC-to-Phone call
> rates.
>

RE: Compound Indexes Problem

Posted by depsi programmer <de...@yahoo.com>.
Hello,
Thanks for your responce.
can you please guide me on how to break this single index into multiple pieces. when I try to do so it corrupts the index.
I had created a index with max merge docs set to 10,000 with set compound indexes set to true. now I called optimize with max merge docs set to 100 and the index was curropted
Thanks 
Depsi

Dennis Kubes <nu...@dragonflymc.com> wrote: According to the Lucene In Action book you can convert from one compound to
multi-file and vice versa by setting the setCompoundFile method to true or
false.  But in running this myself I found that while I can convert from
multi-file to compound, it doesn't convert back.  Here is the code that I
used.

    try {
      System.setProperty("org.apache.lucene.lockDir",
"lock-directory-path-here");
      String idxDir = "index-directory-path-here";
      IndexWriter writer = new IndexWriter(idxDir, new StandardAnalyzer(),
false);
      writer.setUseCompoundFile(false);
      writer.optimize();
      writer.close();
    }
    catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

Dennis

-----Original Message-----
From: depsi programmer [mailto:depsi_programmer@yahoo.com]
Sent: Thursday, March 30, 2006 7:57 AM
To: java-user@lucene.apache.org
Subject: Compound Indexes Problem

Hello,
  I am using lucene for storing details of my students. I have used
  SetUseCompoundFile(True) and optimised the indexes. Now I am not able to
convert them back to their original form
  Thanks in advance
  Depsi


---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save
big.



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org



		
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

RE: Compound Indexes Problem

Posted by Dennis Kubes <nu...@dragonflymc.com>.
According to the Lucene In Action book you can convert from one compound to
multi-file and vice versa by setting the setCompoundFile method to true or
false.  But in running this myself I found that while I can convert from
multi-file to compound, it doesn't convert back.  Here is the code that I
used.

    try {
      System.setProperty("org.apache.lucene.lockDir",
"lock-directory-path-here");
      String idxDir = "index-directory-path-here";
      IndexWriter writer = new IndexWriter(idxDir, new StandardAnalyzer(),
false);
      writer.setUseCompoundFile(false);
      writer.optimize();
      writer.close();
    }
    catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

Dennis

-----Original Message-----
From: depsi programmer [mailto:depsi_programmer@yahoo.com]
Sent: Thursday, March 30, 2006 7:57 AM
To: java-user@lucene.apache.org
Subject: Compound Indexes Problem

Hello,
  I am using lucene for storing details of my students. I have used
  SetUseCompoundFile(True) and optimised the indexes. Now I am not able to
convert them back to their original form
  Thanks in advance
  Depsi


---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save
big.



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org