Re: Help me with this error on indexing

2009-11-21 Thread Simon Willnauer
Try to switch you AntiVirus SW off I you have any. simon 2009/11/21 Fabrício Raphael : > This hapened only on Windows, on Ubuntu it don't happen. > > And I corrected this problem by removing the commit, and put it in the end > of the addition of all documents. > > On Fri, Nov 20, 2009 at 9:14 PM,

Re: Help me with this error on indexing

2009-11-21 Thread Michael McCandless
Are you absolutely certain you are closing the IndexReader after each iteration? That exception looks like there is still a file open... Committing after every added document is hideously inefficient (though, should not cause exceptions like what you're seeing). It's best to commit (or, simply c

Re: best way to iterate through all docs from a query

2009-11-21 Thread Michael McCandless
If you only want to gather the docIDs, this approach is rather wasteful, as it 1) computes the score of each hit, and 2) keeps a sorted queue of all these hits. It also pre-allocates a 1M sized array, which is wasteful if your index doesn't have 1M docs. It's better to create your own subclass of

Re: ConcurrentMergeScheduler, Exception and transaction

2009-11-21 Thread Michael McCandless
An exception during merging does not affect what's stored in the index, because merging is a functional no-op. The same docs are present before and after the merge. So I would think that an app involving Lucene in a 2-phased commit does not need to rollback the transaction if CMS hits an exceptio

Compiling analyzers from the Sandbox - where is comon-build.xml?

2009-11-21 Thread Dorthe Luebbert
Hi, probably a newbie question (both newbie with Lucene and I don't do something with Java very often): I want to use org.apache.lucene.analysis.de.GermanAnalyzer. I checked out the Lucene Sandbox from SVN and wanted to create a build now using cd sandbox/contrib ant -f contrib-build.xml

Re: Compiling analyzers from the Sandbox - where is comon-build.xml?

2009-11-21 Thread Simon Willnauer
You might want to check out lucene/java/trunk/. then go to contrib or contrib/analyzers and simply run "ant". This will build your analyzer. Another way would be simply download the binary dist and use the analyzer from there. simon On Sat, Nov 21, 2009 at 12:06 PM, Dorthe Luebbert wrote: > Hi,

Re: Compiling analyzers from the Sandbox - where is comon-build.xml?

2009-11-21 Thread Dorthe Luebbert
Simon, thanks a lot for the quick response. I did not realize that I was using outdated documentation (looking for "Lucene Sandbox" using Google lead me to the documentation for lucene 2.3.2 and my second source "Lucene in action" has outdated information on this topic as well). Using the bin

Lucene IndexOutput

2009-11-21 Thread nithin kamath
I use Lucene's IndexOutput to dump index contents to a file, I use createOutput method in FSDirectory to create the file in the directory with the given name and use writeString and writeInt to write into it. The createOutput method though creates a new file each time, is there anyway that I can

Re: SpanQuery for Terms at same position

2009-11-21 Thread Adriano Crestani
Hi, I didn't test, but you might want to try SpanNearQuery and set slop to zero. Give it a try and let me know if it worked. Regards, Adriano Crestani On Thu, Nov 19, 2009 at 7:28 PM, Christopher Tignor wrote: > Hello, > > I would like to search for all documents that contain both "plan" and "_