Re: custom sorting of search result

2014-11-04 Thread Alexandre Rafalovitch
Latest versions of Solr have collapsing and expanding plugins, reranking plugins and post-filters. Some combinations of these seem like it might be relevant. And, of course, there is always carrot2 clustering. Regards, Alex. Personal: http://www.outerthoughts.com/ and @arafalov Solr resources

Re: Custom sorting based on external (database) data

2011-05-05 Thread Sujit Pal
Thank you Ahmet, looks like we could use this. Basically we would do periodic dumps of the (unique_id|computed_score) sorted by score and write it out to this file followed by a commit. Found some more info here, for the benefit of others looking for something similar: http://dev.tailsweep.com/sol

Re: Custom sorting based on external (database) data

2011-05-05 Thread Ahmet Arslan
--- On Thu, 5/5/11, Sujit Pal wrote: > From: Sujit Pal > Subject: Custom sorting based on external (database) data > To: "solr-user" > Date: Thursday, May 5, 2011, 11:03 PM > Hi, > > Sorry for the possible double post, I wrote this up but had > the > incorrect sender address, so I am guessin

RE: Custom Sorting

2011-04-20 Thread Michael Owen
Ok thank you for the discussion. As I thought regard to not possible within performance limits. I think the way to go is to document some more stats at index time, and use them in boost queries. :) Thanks Mike > Date: Tue, 19 Apr 2011 15:12:00 -0400 > Subject: Re: Custom Sorting

Re: Custom Sorting

2011-04-19 Thread Erick Erickson
As I understand it, sorting by field is what caches are all about. You have a big list in memory of all of the terms for a field, indexed by Lucene doc ID so fetching the term to compare by doc ID is fast, and also why the caches need to be warmed, and why sort fields should be single-valued. If y

Re: Custom Sorting

2011-04-19 Thread Jonathan Rochkind
On 4/19/2011 1:43 PM, Jan Høydahl wrote: Hi, Not possible :) Lucene compares each matching document against the query and produces a score for each. Documents are not compared to eachother like normal sort, that would be way too costly. That might be true for sort by 'score' (although even i

Re: Custom Sorting

2011-04-19 Thread lboutros
You could create a new Similarity class plugin that take in account every parameters you need. : http://wiki.apache.org/solr/SolrPlugins?highlight=%28similarity%29#Similarity but, as Jan said, be carefull with the cost of the the similarity function. Ludovic. 2011/4/19 Jan Høydahl / Cominvent

Re: Custom Sorting

2011-04-19 Thread Jan Høydahl
Hi, Not possible :) Lucene compares each matching document against the query and produces a score for each. Documents are not compared to eachother like normal sort, that would be way too costly. But if you explain your use case, I'm sure we can find ways to express your needs in other ways P

Re: Custom Sorting in Solr

2010-11-01 Thread Ezequiel Calderara
Ok i imagined that the double linked list would be far too complicated for solr. Now, how can i achieve that solr connects to a webservice and do the import? I'm sorry if i'm not clear, sometimes my english gets fuzzy :P On Fri, Oct 29, 2010 at 4:51 PM, Yonik Seeley wrote: > On Fri, Oct 29, 201

Re: Custom Sorting in Solr

2010-10-29 Thread Yonik Seeley
On Fri, Oct 29, 2010 at 3:39 PM, Ezequiel Calderara wrote: > Hi all guys! > I'm in a weird situation here. > We have index a set of documents which are ordered using a linked list (each > documents has the reference of the previous and the next). > > Is there a way when sorting in the solr search,

RE: Custom Sorting in Solr

2010-10-29 Thread Jonathan Rochkind
There's no way I know of to make Solr use that kind of data to create the sort order you want. Generally for 'custom' sorts, you want to create a field in your Solr index with possibly artificially constructed values that will 'naturally' sort the way you want. How to do that with a linked l

Re: custom sorting / help overriding FieldComparator

2010-09-17 Thread Chris Hostetter
Brad: 1) if you haven't already figured this out, i would suggest emailin the java-user mailing list. It's got a bigger collection of users who are familiar with the internals of the Lucnee-Java API (that's the level it seems like you are having difficulty at) 2) Maybe you mentioned your sor

Re: Custom sorting

2010-05-19 Thread Daniel Cassiano
Hi Dan, It seems that you want a SearchComponent[1], something like the QueryElevationComponent[2]. Take a look how at him and I think you can build your custom solution. [1]- http://lucene.apache.org/solr/api/org/apache/solr/handler/component/SearchComponent.html [2]- http://wiki.apache.org/solr

Re: Custom Sorting Based on Relevancy

2009-05-04 Thread Otis Gospodnetic
Or you could collapse search results with SOLR-236. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message > From: David Giffin > To: solr-user@lucene.apache.org > Sent: Monday, May 4, 2009 12:37:29 PM > Subject: Custom Sorting Based on Relevancy > > H

Re: Custom Sorting

2009-02-27 Thread psyron
I was sucessful with your hint and just need to solve another problem: The problem I have is that I have implemented a custome sorting by following your advice to code a QParserPlugin and to create a custom comparator as described in your book, and it really works But now I also would like to ret

Re: Custom Sorting Algorithm

2009-02-04 Thread Yonik Seeley
On Wed, Feb 4, 2009 at 4:45 PM, wojtekpia wrote: > Ok, so maybe a better question is: should I bother trying to change the > "sorting" algorithm? I'm concerned that with large data sets, sorting > becomes a severe bottleneck (this is an assumption, I haven't profiled > anything to verify). No...

Re: Custom Sorting Algorithm

2009-02-04 Thread wojtekpia
Ok, so maybe a better question is: should I bother trying to change the "sorting" algorithm? I'm concerned that with large data sets, sorting becomes a severe bottleneck (this is an assumption, I haven't profiled anything to verify). Does it become a severe bottleneck? Do you know if alternate sor

Re: Custom Sorting Algorithm

2009-02-04 Thread Mark Miller
It would not be simple to use a new algorithm. The current implementation takes place at the Lucene level and uses a priority queue. When you ask for the top n results, a priority queue of size n is filled with all of the matching documents. The ordering in the priority queue is the sort. The o

Re: Custom Sorting Algorithm

2009-02-04 Thread wojtekpia
That's not quite what I meant. I'm not looking for a custom comparator, I'm looking for a custom sorting algorithm. Is there a way to use quick sort or merge sort or... rather than the current algorithm? Also, what is the current algorithm? Otis Gospodnetic wrote: > > > You can use one of the

Re: Custom Sorting Algorithm

2009-02-04 Thread Otis Gospodnetic
Hi, You can use one of the exiting function queries (if they fit your need) or write a custom function query to reorder the results of a query. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message > From: wojtekpia > To: solr-user@lucene.apache.org >

Re: Custom Sorting

2009-02-03 Thread psyron
Thanks Erik, that helped me a lot ... but still have somthing, i am not sure about: If i am using a custom sort - like the DistanceComparator example described in "oh" your book - and i debugged the code and seem to understand that the the distances-array is created for all indexed documents - n

Re: Custom Sorting

2008-12-16 Thread Erik Hatcher
Markus, A couple of code pointers for you: * QueryComponent - this is where results are generated, it uses a SortSpec from the QParser. * QParser#getSort - creating a custom QParser you'll be able to wire in your own custom sort You can write your own QParserPlugin and QParser, and c

Re: Custom Sorting

2008-12-16 Thread Shalin Shekhar Mangar
On Tue, Dec 16, 2008 at 2:24 PM, psyron wrote: > > I have the same problem, also need to plugin my "customComparator", but as > there is no explanation of the framework, how a RequestHandler is working, > what comes in, what comes out ... just impossible! > > Can someone explain where i have to a

Re: Custom Sorting

2008-12-16 Thread psyron
I have the same problem, also need to plugin my "customComparator", but as there is no explanation of the framework, how a RequestHandler is working, what comes in, what comes out ... just impossible! Can someone explain where i have to add which code, to just have the same functionality as the S

Re: custom sorting

2007-10-31 Thread Chris Hostetter
: If you went with the FunctionQuery approach for sorting by distance, would : there be any way to use the output of the FunctionQuery to limit the : documents to those within a certain radius? Or is it just for boosting : documents, not for filtering? FunctionQueries don't restrict the set of d

Re: custom sorting

2007-10-26 Thread Doug Daniels
If you went with the FunctionQuery approach for sorting by distance, would there be any way to use the output of the FunctionQuery to limit the documents to those within a certain radius? Or is it just for boosting documents, not for filtering? Also, even if you're just using it for boosting, is

Re: custom sorting

2007-09-28 Thread Chris Hostetter
: leaks, etc.). (Speaking of which, could anyone with more Lucene/Solr : experience than I comment on the performance characteristics of the : locallucene implementation mentioned on the list recently? I've taken : a first look and it seems reasonable to me.) i cna't speak for anyone else, but

Re: custom sorting

2007-09-28 Thread Chris Hostetter
: > Using something like this, how would the custom SortComparatorSource : > get a parameter from the request to use in sorting calculations? in general: you wouldn't you would have to specify all options as init params for the FieldType -- which makes it pretty horrible for distance calculatio

RE: custom sorting

2007-09-28 Thread Sandeep Shetty
java.lang.OutOfMemoryError: Java heap space error. is there a way to get around this? -Original Message- From: Jon Pierce [mailto:[EMAIL PROTECTED] Sent: 28 September 2007 15:48 To: solr-user@lucene.apache.org Subject: Re: custom sorting Is the machinery in place to do this now (hook up a

Re: custom sorting

2007-09-28 Thread Jon Pierce
Is the machinery in place to do this now (hook up a function query to be used in sorting)? I'm trying to figure out what's the best way to do a distance sort: custom comparator or function query. Using a custom comparator seems straightforward and reusable across both the standard and dismax hand

Re: custom sorting

2007-09-28 Thread Narayanan Palasseri
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 wheth

Re: custom sorting

2007-09-27 Thread Yonik Seeley
On 9/27/07, Erik Hatcher <[EMAIL PROTECTED]> 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

Re: custom sorting

2007-09-27 Thread Erik Hatcher
On Sep 27, 2007, at 2:50 PM, Chris Hostetter wrote: to answer the broader question of using customized LUcene SortComparatorSource objects in solr -- it is in fact possible. In Solr, all decisisons about how to sort are driven by FieldTypes. You can subclass any of the FieldTypes that come w

Re: custom sorting

2007-09-27 Thread Chris Hostetter
: > Previously we were using lucene to do this. by using the : > SortComparatorSource we could sort the documents returned by distance : > nicely. we are now switching over to lucene because of the features it : > provides, however i am not able to see a way to do this in Solr. Someone started a

Re: custom sorting

2007-09-26 Thread Mike Klaas
On 26-Sep-07, at 5:14 AM, Sandeep Shetty wrote: Hi Guys, this question as been asked before but i was unable to find an answer thats good for me, so hope you guys can help again i am working on a website where we need to sort the results by distance from the location entered by the user. I ha

Re: Custom Sorting

2007-08-20 Thread Chris Hostetter
: Sort sort = new Sort(new SortField[] : { SortField.FIELD_SCORE, new SortField(customValue, SortField.FLOAT, : true) }); : indexSearcher.search(q, sort) that appears to just be a sort on score withe a secondary reversed float sort on whatever field name is in the variable "customValue" .

Re: custom sorting for multivalued field

2007-07-12 Thread Chris Hostetter
: Is it possible to assign a custom sorting value for : each of the values in the multivalued field? So that : the document gets sorted differently, depending on the : matched value in the multivalued field. Sorting happens extremely independently from matching ... there is no mechanism availabl

Re: custom sorting for multivalued field

2007-07-11 Thread Otis Gospodnetic
I'll try answering: - sorting by the term that happened to match a multi-term field is, as far as I know, not possible - "de-duping" search results is, I believe, possible with a patch that is still in JIRA: https://issues.apache.org/jira/browse/SOLR-236 Otis -- Lucene Consulting -- http://l