Re: Document-Ids and Merges

2012-03-28 Thread Christoph Kaser
Hi Shai, That sounds interesting. However, I am unsure how I can do this. Is there a way to store values "with a segment"? How can I get the segment from a document ID? Here is how my ValueSource looks like at the moment: public class MyScoreValues extends ValueSource { float[] values=...

Re: Document-Ids and Merges

2012-03-28 Thread Christoph Kaser
Thank you for your answer! That's too bad. I thought of using my own ID-field, but I wanted to save the additional indirection (from docId to my ID to my value). Do document IDs remain constant for one IndexReader as long as it isn't reopened? If so, I could precalculate the indirection. Best

Re: Can I add new field values to a existing lucene index ?

2012-03-28 Thread Michael McCandless
Alas, no, not yet. This is an oft-requested feature, but challenging to build. That said, there is a possible start towards making something possible in 4.0: https://issues.apache.org/jira/browse/LUCENE-3837 Mike McCandless http://blog.mikemccandless.com On Wed, Mar 28, 2012 at 8:16 AM, Anu

Re: Document-Ids and Merges

2012-03-28 Thread Shai Erera
Hi If you are working with trunk, then I believe that ValUes is what you're looking for. They allow you to store values at the document level, and then read then during search either from disk or RAM. They are also segment based. I'm not sure how ValueSource is used (I've never used it myself and

RE: can't find common words -- using Lucene 3.4.0

2012-03-28 Thread Ilya Zavorin
Steve, I had to pull different pieces of the code below from different places in my system, but here what I do: Analyzer anIndx = new StandardAnalyzer(Version.LUCENE_34); IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_34, anIndx); if

Re: boolean score calculation

2012-03-28 Thread Robert Muir
On Tue, Mar 27, 2012 at 5:58 PM, Pavel Goncharik wrote: > 1) do I miss something in Lucene 3 or 4? > 2) wouldn't it be much more flexible, if there was an easy-to-override > method/parameter in e.g. Similarity or BooleanQuery, to be invoked by > boolean scorers for calculating compound score of bo

Re: Document-Ids and Merges

2012-03-28 Thread Michael McCandless
On Wed, Mar 28, 2012 at 3:37 AM, Christoph Kaser wrote: > Thank you for your answer! > > That's too bad. I thought of using my own ID-field, but I wanted to save the > additional indirection (from docId to my ID to my value). > Do document IDs remain constant for one IndexReader as long as it isn'

RE: Can I add new field values to a existing lucene index ?

2012-03-28 Thread Tim Eck
Excuse my ignorance of lucene internals, but is the problem any easier if the requirement is just to allow the addition/removal of stored only fields (as opposed to indexed)? I suspect this wasn't intent of the original question, but a document can certainly be deleted and re-added to the index w