RE: References to deleted file handles in long-running server application

2005-11-18 Thread Otis Gospodnetic
I was thinking of doing something like this for my numerous indices over on Simpy.com. However, I was thinking of something much simpler - an IndexSearcher subclass with close() overriden. The implementation of close() would then just start a Thread and call super.close() after N seconds. I have

Re: TermFreqVector

2005-11-18 Thread Anna Buczak
Grant, Thank you for the information. When I made the appropriate changes in my code, it worked as a charm. Anna Grant Ingersoll wrote: > Hi Anna, > > The sample I sent is from a modified version of the demo (line 87 in > HTMLDocument of the latest code) that I am preparing for my ApacheCon >

Re: TermFreqVector

2005-11-18 Thread Grant Ingersoll
Hi Anna, The sample I sent is from a modified version of the demo (line 87 in HTMLDocument of the latest code) that I am preparing for my ApacheCon talk (which will cover Term Vectors, amongst other things). At any rate, if you look at the Field constructor for 1.4.3: |*Field

Re: Lucene & Transactional semantics

2005-11-18 Thread Marios Skounakis
Beto, Here is an idea I have been working on as a workaround: Suppose you want to create a new document. The steps to do that are: 1. Insert the document into a "Pending Documents" table in the database. 2. Index the document with Lucene 3. Insert the document into the "Documents" table in the d

Re: Field Boosting

2005-11-18 Thread Erik Hatcher
Daniel, As I hope you've seen from the other messages on this thread, this is by design. What you've shown is _not_ boost working improperly. Boosts are part of the score via the fieldNorm value, and I'm certain that your boosts are being taking into account for scoring. Boosts are not

TermFreqVector

2005-11-18 Thread Anna Buczak
>You have to tell lucene to store term freq >vectors (it isn't done by default). This is exactly the part that I do not know how to do. Where to set the flag ? I use for indexing org.apache/lucene.demo.IndexFiles. >Do you have at least >one field? Now I know that Lucene adds three fields by defau

Re: TermFreqVector

2005-11-18 Thread Grant Ingersoll
On the 1.9 code base, you construct a Term Vector by doing something like: Document doc = ... doc.add(new Field("contents", "some value", Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.WITH_POSITIONS_OFFSETS)); Check out the javadocs for field construction. Once you have done this,

Re: Field Boosting

2005-11-18 Thread Daniel . Clark
titleField.setBoost((float)1.8); doc.add(titleField); keywordField.setBoost((float)1.6); doc.add(keywordField); summaryField.setBoost((float)1.2); doc.add(summaryField); When searching. field.getBoost() always = 1.0 ~ Daniel Clark, Senior Consultant Syba

Re: Deprecated API in BooleanQuery broken in Lucene from CVS?

2005-11-18 Thread Patrick Kimber
Daniel You are correct. The latest version from SVN works correctly. Very confusing - I only checked out Lucene from CVS a few days ago. I didn't realise that changes were only being made in the SVN repository. Thank you very much for your help. Regards Patrick On 17/11/05, Daniel Naber <[EMAIL

RE: References to deleted file handles in long-running server application

2005-11-18 Thread Vanlerberghe, Luc
Good rule of thumb: don't ever count on the garbage collector cleaning up for you (even if you call System.gc() to give it a hint). You should close your IndexSearchers, but with a multithreaded application it's difficult to know when (you have to keep them open until no thread uses it any more)

Re: References to deleted file handles in long-running server application

2005-11-18 Thread Paul Smith
I have found exactly the same problem. You should consider adding an 'expired" IndexSearcher to some sort of Buffer that closes the IndexSearcher after some default timeout. I have not found in practice that allowing the GC to do the work does quite what you think it might do (particularl

RE: References to deleted file handles in long-running server application

2005-11-18 Thread Matt Magoffin
I'm updating nearly continuously (probably average about every 10 seconds). I don't explicitly close the IndexSearcher objects I create, as I share them across threads, but do leave them to be garbage collected. I ran into index corruption issues when I explicitly closed them, since I don't have an