Re: deletion of index-files fails

2009-03-06 Thread rolarenfan
FWIW, +1 from me on all this: when I started poking at my little problem I found as you said that there was really no way to trace the issue (one can use the debugger of course and I did, which is how I found the problem). So, getRefCount() would be good! thanks, Paul -Original Message--

Re: deletion of index-files fails

2009-03-06 Thread rolarenfan
I did just now double/triple-check: the IndexWriter is definitely closed. However (cough), I did have a bogus call to IndexReader.incRef() ... once I removed that, the call to IndexReader.close() actually worked and then the deletion did so too. Thanks; sorry to trouble you. -Paul -Orig

Re: deletion of index-files fails

2009-03-06 Thread rolarenfan
Right, I should have included these data in my orig. message (sorry): WinXP, R2.4 I do have permissions and the files are definitely part of the index being removed; nothing outside of (my code that uses) Lucene would have a handle on these files. -Paul -Original Message- >From: Ia

deletion of index-files fails

2009-03-05 Thread rolarenfan
So, I have a (small) Lucene index, all fine; I use it a bit, and then (on app shutdown) want to delete its files and the containing directory (the index is intended as a temp object). At some earlier time this was working just fine, using java.io.File.delete(). Now however, some of the files get

what's the best practice for getting "next page" of hits?

2009-02-18 Thread rolarenfan
R2.4 So, I may well be missing something here, but: I use IndexSearcher.search(someQuery, null, count, new Sort()); to get an instance of TopFieldDocs (the "Hits" is deprecated). So far, all fine; I get a bunch of documents. Now, what is the Lucene-best-practice for getting the *next* batch

Re: newbie seeking explanation of semantics of "Field" class

2009-02-18 Thread rolarenfan
Thanks to Erick, Matthew, and Uwe -- that does help, a lot. E.g., one bit of code I had (mostly copied) now makes more sense: // add this field, to allow retrieving the full-text: myDocument.add(new Field("contents", theFullDocumetText, Field.Store.COMPRESS, Field.Index.NO)); // add this fiel

newbie seeking explanation of semantics of "Field" class

2009-02-17 Thread rolarenfan
R2.4 I have been looking through the soon-to-be-superseded (by its 2nd ed.) book "Lucene In Action" (hope it's ok on this newsgroup to say I like that book); also at these two tutorials: http://darksleep.com/lucene/ and http://www.informit.com/articles/article.aspx?p=461633&seqNum=3 and also a

Re: why would a Field *vanish* from a Document?

2009-01-25 Thread rolarenfan
>> Now I notice (from googling) that I can also downcast TermFreqVector >> to TermPositionVector, which contains the offsets (which I will need). >> >> So -- under what conditions would that cast fail? > >The cast fails if you had indexed the field with Field.TermVector.YES, >which does not st

Re: why would a Field *vanish* from a Document?

2009-01-24 Thread rolarenfan
Hey Mike -- Thanks for prompt & clear reply! > >This (the sneaky "difference" between an indexed Document and a the >newly-created-at-search-time Document) is a frequent confusion with >Lucene. > >The field needs to be marked as stored (Field.Store.YES) in order for >it to appear in the ret

why would a Field *vanish* from a Document?

2009-01-23 Thread rolarenfan
R 2.4 I am rather new to Lucene, and it is entirely likely that the problem is somehow mine -- but I have no clue how. I have an index (of files), all fine; I post keyword queries and get lists of documents, all fine. Now I want to query against something other than keywords, so (here I am i

why would Explanation be *ALWAYS* null?

2009-01-21 Thread rolarenfan
R2.4 There is much about Lucene that I do not understand, so it may be that there is some simple or obvious mistake I am making. I build an index, get hits (documents) back from it, with various non-zero scores. Now I call this code: Explanation expl = _searcher.explain(rewrite, docIn

RE: how to get the

2008-10-16 Thread rolarenfan
Steve- >On 10/16/2008 at 12:00 PM, [EMAIL PROTECTED] wrote: >> Still a newbie here, sorry: >> >d) Get the tagged version by checking out the "highlight" package through SVN: > > > Perfect -- thanks! (Just didn't

how to get the "highlight" code for v 2.2.0 (or any prior version)?

2008-10-16 Thread rolarenfan
Still a newbie here, sorry: a) I can see how to get a zip/jar of the Lucene v.2.2.0 (http://www.urlstructure.com/apache/lucene/java/archive/) or v.2.3.0 (http://www.urlstructure.com/apache/lucene/java/) b) but none of those contain the package "org.apache.lucene.search.highlight" c) I

Re: bunch of newbie queries, PS

2008-10-16 Thread rolarenfan
Hoss -- Thanks for prior replies; now back to this one. Context: I am trying to work with 2.2.0 (as mentioned), but when I got the downloads (src and class-jar), they did not inclde something called "highlighter" that it now turns out I need. So ... >: the "anonymous" SVN (http://svn.apache

Re: bunch of newbie queries, PS

2008-10-06 Thread rolarenfan
Hoss -- Thanks for reply -- >Paul: your subject linke seems to indicate that your email is a followup >to previous questions, however i don't seem to have ever seen those >questions posted on the list, and i can't seem to find any previous emails >from you in any of hte online archives -- so

bunch of newbie queries, PS

2008-10-01 Thread rolarenfan
OK, after googling around for a while, I found this: http://wooga.drbacchus.com/lucene-and-documentation (alas, I agree) and then eventually I realized that the download web-page directory has a link to the "archive" where all the old stuff is (probably this is common and obvious, but I kept