You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Scott Farquhar <sc...@atlassian.com> on 2005/04/04 16:44:08 UTC

FieldCache getCustom() method

Hello all,

I've just bought the Lucene in Action book, and I'm delving into search
sorts, trying to improve the way that we do sorting in JIRA.

I'm looking to implement my own SortComparatorSource, as many of the
objects that I need to return from the index can't return comparable, and
I want to use a custom comparator to do the comparison.

So I thought that I would copy the source to SortComparator, and add my
own method getComparator() that subclasses could implement. So far, so
good.

However, the problem is that FieldCache.getCustom() only takes a
SortComparator, not a SortComparatorSource object.

Is there any reason for this?  

The reason is that I want to return an Object from
SortComparator.getComparable(), rather than a Comparable.

If I can't use the FieldCache directly - can I copy the class?  Is there
any explanation of how the FieldCache works?

Thanks in advance for any answers.

Cheers,
Scott

-- 
ATLASSIAN - http://www.atlassian.com
Expert J2EE Software, Services and Support
-------------------------------------------------------------
JIRA Docs: http://www.atlassian.com/software/jira/docs/latest

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org