lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narayanan Palasseri" <palass...@gmail.com>
Subject Re: custom sorting
Date Fri, 28 Sep 2007 12:55:15 GMT
Hi all,
Regarding this issue, we tried using a custom request handler which inturn
uses the CustomCompartor. But this has a memory leak and we are almost got
stuck up at that point. As somebody mentioned, we are thinking of moving
towards function query to achieve the same. Please let me know whether
anybody has faced similar issue or is it that we are doing something wrong.
The additional code that we have return from the default handler is as given
below.

*

if* ("*myappRequestHandler*".equalsIgnoreCase(requestHandler))

{

sort = getSortCriteria(*new* SimpleSortComparatorSourceImpl());

}

Thanks and Regards
Narayanan


On 9/28/07, Yonik Seeley <yonik@apache.org> wrote:
>
> On 9/27/07, Erik Hatcher <erik@ehatchersolutions.com> wrote:
> > Using something like this, how would the custom SortComparatorSource
> > get a parameter from the request to use in sorting calculations?
>
> perhaps hook in via function query:
> dist(10.4,20.2,geoloc)
>
> And either manipulate the score with that and sort by score,
>
> q=+(foo bar)^0 dist(10.4,20.2,geoloc)
> sort=score asc
>
> or extend solr's sorting mechanisms to allow specifying a function to sort
> by.
>
> sort="dist(10.4,20.2,geoloc) asc"
>
> -Yonik
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message