Re: another question about phrasequery?(thanks again)

2010-03-22 Thread luocan19826164
sorry, describle again.I mean that query for "little boy" will match the both document.the Document that only has term "boy" and "little" will match the query.the document one add some sore beacuse it exactly match the query(term position totally match).do I describe clearly? for example:Documen

Re: another question about phrasequery?(thanks again)

2010-03-22 Thread luocan19826164
sorry, describle again.   Document 1: little boy is runningDocument 2:boy is littleI mean that a  query for "little boy" will match the both document. the Document that only has term "boy" and "little" will match the query. the document 1 add some sore beacuse it exactly match the query(term posit

答复: about lucene in action 2

2010-03-14 Thread luocan19826164
Thanks very much for your patience! Nor are the files "sync"'d.?It means something like reading disk file to RAM,so reader can see it? And why flushing(reopen) is much faster than commit? flushing means writing stuff to disk, commit means writing stuff to disk and then reading the new created di

Re: problem about backup index file

2010-02-25 Thread luocan19826164
thanks for your paper,Michael McCandlessI have one quetion about thisFor all other files, Lucene is "write once.”This makes doing incremental backups very easy: Simply compare the file names.Once a file is written, it will never change; therefore, if you've already backed up that file, there's no

problem about backup index file

2010-02-25 Thread luocan19826164
I want backup my index file,but I get the follow error. java.io.IOException: another program lock the file! at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(Unknown Source) at com.common.Utils.copyDirectory(Utils.java:149) at com.common.Utils.copyDirectory(Uti

RE: here a small test case problem:lucene did not delete old index file after optimize method called

2010-02-10 Thread luocan19826164
I watched there are three compound files. 0.cfs  6786kb 1.cfs  2044kb 2.cfs  8790kb(the optimize file) I think in this testcase only 2.cfs left(the optimize file left),Is that right??   import java.io.File; import java.io.IOException;   import org.apache.lucene.analysis.standard.StandardAnalyzer;

Re: problem:lucene did not delete old index file after optimize method called

2010-02-10 Thread luocan19826164
thanks for your reply! but I don't think there is an IndexReader still reading those files,because I call indexReader close and reopen every 1 minute .   IW also deletes unreferenced files,but why it delete the optimize file,not delete the old index file. the merged file is what I wanted.   ((aft

problem:lucene did not delete old index file after optimize method called

2010-02-10 Thread luocan19826164
lucene did not delete old index file after optimize method called. ps:I call IndexWriter.getReader() and then call old IndexReader.close() every 1 minute, a long time pass, I watche old index file did not disappear. after I restart my program, optimize index file disappear,but old index file