You can use the FieldCache to access the values of multiple fields (the same
source default sorting uses).

Alternately, if you want to generate a score based on a function of multiple
fields rather than doing an absolute sort, you can use FunctionQuery:
http://issues.apache.org/jira/browse/LUCENE-446

> 2. In spite of knowing the syntax, is this a perf killer? Is it better to
> load all the values in one field, then split them out in a string[]
similar
> to the LIA example?

Separate fields is more flexible (unless you never want to sort or query on
them independently). The performance would depend somewhat on what function
you are calculating.


-Yonik
Now hiring -- http://tinyurl.com/7m67g

On 10/9/05, Jeff Rodenburg <[EMAIL PROTECTED]> wrote:
>
> In following the LIA custom sort example, the calculated sort value is
> based
> on a field that contains all necessary values, i.e. "x,y" which is split
> into two values for use in a distance algorithm.
>
> Suppose I want a custom sort basis that performs a similar calculation,
> but
> is based on a multiple # (3,4,....n) of fields?
>
> 1. I assume I'm just not connecting the dots on the API, but how do I get
> the terms from multiple fields in order to generate the calculation?
> 2. In spite of knowing the syntax, is this a perf killer? Is it better to
> load all the values in one field, then split them out in a string[]
> similar
> to the LIA example?
>
> cheers,
> jeff r.
>
>

Reply via email to