Re: Sorting: string vs int

2005-11-10 Thread Chris Hostetter
: I guess it would be nice to have some way of telling the searcher (and : the fieldcache) whether the actual string values are needed or not... : it could save a lot of memory when there are a lot of unique terms. you're talking about something like LUCENE-457 right? ... but make it optional so

RE: Sorting: string vs int

2005-11-10 Thread Monsur Hossain
o: java-user@lucene.apache.org > Subject: Re: Sorting: string vs int > > Here is a snippet of the current StringIndex class: > > public static class StringIndex { > /** All the term values, in natural order. */ > public final String[] lookup; > > /** For each d

Re: Sorting: string vs int

2005-11-10 Thread Yonik Seeley
Here is a snippet of the current StringIndex class: public static class StringIndex { /** All the term values, in natural order. */ public final String[] lookup; /** For each document, an index into the lookup array. */ public final int[] order; } The order field is used for sor

RE: Sorting: string vs int

2005-11-10 Thread Monsur Hossain
mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 09, 2005 9:23 PM > To: java-user@lucene.apache.org > Subject: Re: Sorting: string vs int > > The FieldCache (which is used for sorting), uses arrays of size > maxDoc() to cache field values. String sorting will involve

Re: Sorting: string vs int

2005-11-09 Thread Yonik Seeley
The FieldCache (which is used for sorting), uses arrays of size maxDoc() to cache field values. String sorting will involve caching a String[] (or StringIndex) and int sorting will involve caching an int[]. Unique string values are shared in the array, but the String values plus the String[] will