I've never dealt with multisearcher's before, so i'm not sure what caveats
there are when doing Sorts with them, but you should be able to make your
own SortComparatorSource which knows about any special fields you have
that might go by multiple names, and when it's requested to sort on one of
those fields, you can check the values for either field name before doing
the comparison.

For an eample of writing your own SortComparatorSource, take a look at
this PATCH...

        http://issues.apache.org/jira/browse/LUCENE-406



: Date: Mon, 26 Sep 2005 04:16:17 -0400
: From: JMA <[EMAIL PROTECTED]>
: Reply-To: java-user@lucene.apache.org
: To: java-user@lucene.apache.org
: Subject: Cannot  sort results with multisearcher when mismatched field
:     names
:
:
: Greetings!
: I have a relatively simple problem:
: I want to sort a set of search results by a field, say "author".
: Fine for one index, or more than one if the field "author" is the same.
:
: However, say I want to use a multisearcher (2+ indices), but the second
: index uses field name "writer".
:
: If I set a sortField array, that sorts first by author THEN writer.
: That's not what I want - I want "author" and "writer" to be treated
: as if they are the same field.
:
: I could re-index using a common field name, but would rather not.
: I could do my own custom sort after I get back the hits, but would rather
: not.
:
: Ideas?
:
: Thanks,
: JMA
:
:
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: [EMAIL PROTECTED]
: For additional commands, e-mail: [EMAIL PROTECTED]
:



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to