Re: sorting on a multivalued field

2008-03-18 Thread Joshua Reedy
On Mon, Mar 17, 2008 at 12:39 PM, Chris Hostetter
[EMAIL PROTECTED] wrote:

  : It appears that adding sort functions would be done in Lucene, and not

 : in solr.  I'm not sure I want to go down that path, so I'm wondering
  : if there's a way to accomplish this with solr.  From recent
  : discussions, it sounds like I might be able to do this with some boost
  : magic.  Unfortunately, I haven't found any examples of boosting that
  : seem close to what I want to do.

  I can't think of anyway to accomplish anything like this without writing
  some custom Java code in Solr ... either some custom ValueSources to use
  in FunctionQuery, or a custom Sort object.


the custom Sort object seems a bit more direct.

I'm not very familiar with the solr source.  Can you give me some idea
of how to get started -- maybe this is now a better discussion for
solr-dev . . .

-- 
-
Be who you are and say what you feel,
because those who mind don't matter and
those who matter don't mind.
 -- Dr. Seuss


Re: sorting on a multivalued field

2008-03-17 Thread Chris Hostetter

: It appears that adding sort functions would be done in Lucene, and not
: in solr.  I'm not sure I want to go down that path, so I'm wondering
: if there's a way to accomplish this with solr.  From recent
: discussions, it sounds like I might be able to do this with some boost
: magic.  Unfortunately, I haven't found any examples of boosting that
: seem close to what I want to do.

I can't think of anyway to accomplish anything like this without writing 
some custom Java code in Solr ... either some custom ValueSources to use 
in FunctionQuery, or a custom Sort object.


-Hoss



sorting on a multivalued field

2008-03-12 Thread Joshua Reedy
I'd like to be able to sort documents based on date.  For ascending
sort, the first date in the future relative to the time of the search
would be used as the sort date.  If all dates are in the past, the
last date should be used.  For descending sort, the opposite . . .

document 1:
id: 1
date: 2008-03-10 11am, 2008-03-10 3pm, 2008-04-10 11am

document 2:
id: 2
date: 2008-02-10 12pm, 2008-03-10 1pm, 2008-03-11 12pm, 2008-03-11
1pm, 2008-04-02 12pm

at  11:30am on 2008-03-10, doc2 sort before doc1 in an ascending sort
and at 1:30pm, doc1 would sort before doc2


It appears that adding sort functions would be done in Lucene, and not
in solr.  I'm not sure I want to go down that path, so I'm wondering
if there's a way to accomplish this with solr.  From recent
discussions, it sounds like I might be able to do this with some boost
magic.  Unfortunately, I haven't found any examples of boosting that
seem close to what I want to do.



thanks,
joshua

-- 
-
Be who you are and say what you feel,
because those who mind don't matter and
those who matter don't mind.
 -- Dr. Seuss