Heads Up - Index File Format Change on Trunk

2011-06-10 Thread Simon Willnauer
Hey folks, I just committed LUCENE-3108 (Landing DocValues on Trunk) which adds a byte to FieldInfo. If you are running on trunk you must / should re-index any trunk indexes once you update to the latest trunk. its likely if you open up old trunk (4.0) indexes, you will get an exception related t

Re: multiple small indexes or one big index?

2011-06-10 Thread Itamar Syn-Hershko
Erick, Sorry about reopening this more than a week late... You were asking about the size of each index; at what index size would you consider splitting to several indices with multiple searches etc, for what reasons, and does it matter which Lucene version is used? Thanks :) Itamar.

Re: Improving disk efficiency for autocompleter / spellchecker

2011-06-10 Thread Ian Lea
Not opening the index for every keypress should make a big difference! Most of the tips in http://wiki.apache.org/lucene-java/ImproveSearchingSpeed will apply. -- Ian. On Fri, Jun 10, 2011 at 1:52 PM, Elmer wrote: > Hello again :) > > I've created a autocompleter class, based on the contrib

Improving disk efficiency for autocompleter / spellchecker

2011-06-10 Thread Elmer
Hello again :) I've created a autocompleter class, based on the contrib SpellChecker source code (it creates start1-20 grams, no middle/end grams). The use case for this class, as with most autocompleters, is that it is called on each keypress from the user. What happens is, that on each keypress,

Re: Updating a document

2011-06-10 Thread Erick Erickson
Well, taking the code all together, what I expect is that you'll have a document after all is done that only has a "DocId" in it. Nowhere do you fetch the document from the index. What is your evidence that you haven't deleted the document? If you haven't reopened your reader after the above, you'

Re: Updating a document

2011-06-10 Thread Ian Lea
In different code samples you've got both DocId and DocID. If that isn't the problem I suggest you post a complete little program that demonstrates the problem. As small as possible, no external dependencies. -- Ian. On Fri, Jun 10, 2011 at 12:24 PM, Pranav goyal wrote: > Hi Danny, > > I hav

Re: Updating a document

2011-06-10 Thread Pranav goyal
Hi Danny, I have explained it above. It has many fields out of which DocId is the field which I am storing as well as indexing. While other fields I am just storing. And Each document has unique DocId. d=new Document(); File indexDir = new File("./index-dir"); StandardAnalyzer analyzer = new Sta

Re: Updating a document

2011-06-10 Thread Danny Lade
You delete it first using your id: >writer.deleteDocuments(term); > and then re-add it with the same id: writer.addDocument(d); > Please explain: How looks your document BEFORE you try to delete it? (Which fields has it?) Greetings Danny

Re: Updating a document

2011-06-10 Thread Pranav goyal
When I am using a deleteAll() instead of deleteDocuments(); it's working fine. What can be the problem. Still not able to figure it out. On Fri, Jun 10, 2011 at 3:50 PM, Pranav goyal wrote: > Hi Ian, > > Thanks for your reply. But even this isn't working. > My document is not getting deleted. >

Re: Updating a document

2011-06-10 Thread Pranav goyal
Hi Ian, Thanks for your reply. But even this isn't working. My document is not getting deleted. Can you please suggest me something else? On Fri, Jun 10, 2011 at 3:21 PM, Ian Lea wrote: > Try Term term = new Term("DocId", contract.getDocId());. See the > javadocs for the difference between

Re: Updating a document

2011-06-10 Thread Ian Lea
Try Term term = new Term("DocId", contract.getDocId());. See the javadocs for the difference between that and what you have. You don't need to call optimize() all the time, it at all. -- Ian. On Fri, Jun 10, 2011 at 9:24 AM, Pranav goyal wrote: > Hi, > > I tried 3-4 ways to delete a document

Re: Boosting a document at query time, based on a field value/range

2011-06-10 Thread Toke Eskildsen
On Fri, 2011-06-10 at 10:38 +0200, Sowmya V.B. wrote: > I am looking for a possibility of boosting a given document at query-time, > based on the values of a particular field : instead of plainly sorting the > normal lucene results based on this field. I think you misunderstand Eric's answer, as h

Re: Boosting a document at query time, based on a field value/range

2011-06-10 Thread Sowmya V.B.
Hi Erick Thanks for the response. I would want the documents with values within #20-30# be ranked above the documents with some other values. Well, since there might be a case where there are no documents in that range, I would also prefer to have other documents listed too, somewhere lower down

Updating a document

2011-06-10 Thread Pranav goyal
Hi, I tried 3-4 ways to delete a document but still no results. I am using Lucene 3.1 I used writer.UpdateDocuments(Term term, Document d) as well as write.addDocument(d); and after that writer.deleteDocuments(d); Using both I am not able to delete the previous document. Is there any problem in