RE: IndexSearcher hanging on to old index files in Windows

2005-04-29 Thread Aaron Loucks
I had this exact same problem in a j2ee + windows environment. Even when the index searcher was closed, it still seemed to hold onto the file. As I recall I solved this by only caching the IndexSearcher long enough to get the results I wanted to display. If the user would look at the next page of r

Re: Re[2]: multi word synonym (was Hungarian notation analyzer and phrase queries)

2005-04-29 Thread Paul Libbrecht
I knew there was a catch... I do think, however, that the point is a delicate one which would consideration: multi-word synonyms are quite common! paul Le 29 avr. 05, à 18:47, Paul Smith a écrit : Indexing every multi-word synonym as a single token would introduce spaces into the tokens. In that

RE: IndexSearcher hanging on to old index files in Windows

2005-04-29 Thread Luke Francl
On Fri, 2005-04-29 at 14:29, Monsur Hossain wrote: > Thanks Chuck, this is all really helpful. That explicit close() is what > allows the files stored up in "deletable" to eventually be deleted. I'm > wary of relying on the GC to clean up my work, so I think I'll use that > reference counting sy

RE: IndexSearcher hanging on to old index files in Windows

2005-04-29 Thread Monsur Hossain
> I ran this test a little differently than letting the > IndexSearcher get garbage collected. Instead, I explicitly closed the > searcher (reader) and reopened it periodically. Thanks Chuck, this is all really helpful. That explicit close() is what allows the files stored up in "deletable" to

Re: IndexSearcher hanging on to old index files in Windows

2005-04-29 Thread Chuck Williams
Monsur Hossain wrote: Just tried this on my linux laptop - with IndexSearcher uncommented, I still get a single .cfs file. Hmmm, rereading this, I'm curious to know how/why this works in Linux. Consider this scenario: 1) Create a new index 2) Create a new IndexSearcher pointing to that index.

Re: IndexSearcher hanging on to old index files in Windows

2005-04-29 Thread Chuck Williams
Monsur Hossain wrote: "The process cannot access the file because it is being used by another process." It then sticks the filename in Lucene's "deletable" file to be deleted at some later time. As a sanity check I used Process Explorer to delete the file handle before running the incremental in

RE: IndexSearcher hanging on to old index files in Windows

2005-04-29 Thread Monsur Hossain
> Just tried this on my linux laptop - with IndexSearcher uncommented, I > still get a single .cfs file. Hmmm, rereading this, I'm curious to know how/why this works in Linux. Consider this scenario: 1) Create a new index 2) Create a new IndexSearcher pointing to that index. 3) Run an incremen

RE: IndexSearcher hanging on to old index files in Windows

2005-04-29 Thread Monsur Hossain
> Just tried this on my linux laptop - with IndexSearcher uncommented, I > still get a single .cfs file. It's one of those problems > where Windows > doesn't let you erase the file. I'd start this SortTest in the > debugger and step through it until you find a spot where you see that > some inde

Re: Re[2]: multi word synonym (was Hungarian notation analyzer and phrase queries)

2005-04-29 Thread Paul Smith
Indexing every multi-word synonym as a single token would introduce spaces into the tokens. In that case searching for (java) would not match "i love jsp and tomcat". I think that searching for (java*) would match. Rewriting the query is also problematic. If you search for (java server), you don't

Re: skip document header while indexing

2005-04-29 Thread Erik Hatcher
On Apr 29, 2005, at 8:30 AM, Pablo Gomes Ludermir wrote: Could you give me some pointers (example or website) to how I could do that? Lucene's own source code has several analyzers that are worth investigating. We also include several in Lucene in Action that demonstrate additional features lik

Re: skip document header while indexing

2005-04-29 Thread Pablo Gomes Ludermir
Could you give me some pointers (example or website) to how I could do that? On 4/29/05, Erik Hatcher <[EMAIL PROTECTED]> wrote: > > On Apr 29, 2005, at 7:50 AM, Pablo Gomes Ludermir wrote: > > > Hello all, > > > > Is it possible to skip the first "xx" words while indexing a document? > > For in

Re: skip document header while indexing

2005-04-29 Thread Erik Hatcher
On Apr 29, 2005, at 7:50 AM, Pablo Gomes Ludermir wrote: Hello all, Is it possible to skip the first "xx" words while indexing a document? For instance, on the code bellow, I would like to skip the "xx" first words of "file" on the "CONTENTS_FIELD". Is that possible? Document doc = new Document();

skip document header while indexing

2005-04-29 Thread Pablo Gomes Ludermir
Hello all, Is it possible to skip the first "xx" words while indexing a document? For instance, on the code bellow, I would like to skip the "xx" first words of "file" on the "CONTENTS_FIELD". Is that possible? Document doc = new Document(); FileInputStream is = new FileInputStream(file); Reader