How can I limit the number of hits in my query?

2007-05-14 Thread David Leangen
Hello! I am new to Lucene, so forgive me if my question is basic. I did try googling for an answer... For an ajax autocomplete widget, I am querying using Lucene. I only want to return, for example, the first 20 hits of anything that Lucene finds in whatever order Lucene gives to me. Two quest

FSDirectory and merge indexes

2007-05-14 Thread Gilbert Groenendijk
Hi, Currently I'm trying to create a temporary index on my filesystem and after that merge it with an existing index. I've tried to use 'addIndexesNoOptimize' but I need to pass in an array of directories. How do I create that array when I'm using FSDirectory.getDirectory. it gives me an error

How to Update the Index once it is created

2007-05-14 Thread Krishna Prasad Mekala
Hi All, Thanks for your response. I have one more doubt. How can I update a index once created from Oracle, instead of recreating the whole. Whenever there is a change in the oracle table (insertion/updation/deletion of a row) my application should update the index. Thanks in advance.

Re: How to Update the Index once it is created

2007-05-14 Thread Jyoti Narula Ranjan
Hi Krishna I am also new to Lucene and it seems that the response to your query was made directly to you. May I request you to forward the replies to me as well, so I may refer to these when needed. Thanks Regards Jyoti Krishna Prasad Mekala wrote: > Hi All, > > > > Thanks for your response. I

Re: How can I limit the number of hits in my query?

2007-05-14 Thread Erick Erickson
See below On 5/14/07, David Leangen <[EMAIL PROTECTED]> wrote: Hello! I am new to Lucene, so forgive me if my question is basic. I did try googling for an answer... For an ajax autocomplete widget, I am querying using Lucene. I only want to return, for example, the first 20 hits of anything

Re: FSDirectory and merge indexes

2007-05-14 Thread Erick Erickson
FSDirectory fsd1 = FSDirectory.getDirectory("e:/Index1"); FSDirectory fsd2 = FSDirectory.getDirectory("e:/Index2"); FSDirectory fsd3 = FSDirectory.getDirectory("e:/Index3"); FSDirectory fsd4 = FSDirectory.getDirectory("e:/Index4"); FSDirectory

Re: How to Update the Index once it is created

2007-05-14 Thread Erick Erickson
You have to delete the old document and add it a new one. See IndexModifier class. There is no ability to modify a document in place. Best Erick On 5/14/07, Krishna Prasad Mekala <[EMAIL PROTECTED]> wrote: Hi All, Thanks for your response. I have one more doubt. How can I update a index o

[ANN] Limax

2007-05-14 Thread karl wettin
Limax is a Java 1.5 @annotation and reflection powered transactional object storage and tokenization framework for Lucene, distributed under the Apache license. There are no external dependencies. Lucene is used for object storage and index. http://projects.ginandtonique.org/projects/lima

IndexReader.deleteDocument(int docid) equivalent in 2.1 IndexWriter?

2007-05-14 Thread Lucifer Hammer
I noticed that the API for Lucene 2.1+ includes a deleteDocuments(Term) method in the IndexWriter. I'd love to be able to change my application to use it (we're constantly updating docs, which means opening/closing the writer/reader each time we update a doc). I use complex queries to determine w

Re: IndexReader.deleteDocument(int docid) equivalent in 2.1 IndexWriter?

2007-05-14 Thread Doron Cohen
"Lucifer Hammer" <[EMAIL PROTECTED]> wrote on 14/05/2007 13:03:32: > I noticed that the API for Lucene 2.1+ includes a deleteDocuments(Term) > method in the IndexWriter. I'd love to be able to change my application to > use it (we're constantly updating docs, which means opening/closing the > wri

Re: Problem using wildcardsearch in phrase search

2007-05-14 Thread Chris Hostetter
: queryparsersyntax page which is where I expect most novices (such as : myself) start with lucene seems to indicate that wildcards can be used : in, and this page is : as far as one should need to go to understand basic query syntax, this : page should be corrected. if you have a suggestion for

Re: How can I limit the number of hits in my query?

2007-05-14 Thread David Leangen
Thank you very much for this. Some more questions inline... > > - How can I limit the number of hits? I don't know in >advance what the data will be, so it's not feasible for >me to use RangeQuery. > > > You can use a TopDocs or a HitCollector object wh

Memory leak (JVM 1.6 only)

2007-05-14 Thread Stephen Gray
Hi everyone, I have an application that indexes/searches xml documents using Lucene. I'm having a problem with what looks like a memory leak, which occurs when indexing a large number of documents, but only when the application is running under JVM 1.6. Under JVM 1.5 there is no problem. What