Re: Custom Sorting

2014-06-25 Thread Vitaly Funstein
As a compromise, you can base your custom sort function on values of stored fields in the same index - as opposed to fetching them from an external data store, or relying on internal sorting implementation in Lucene. It will still be relatively slow, but not nearly as slow as going out to a DB... t

Re: Custom Sorting

2014-06-25 Thread Erick Erickson
Sure, you can write a custom function, see: https://cwiki.apache.org/confluence/display/solr/Function+Queries And you can invoke your custom function since sorting by function is supported. But my point remains. To be performant, you'll have to cache the results. Which is what's happening alread

Re: Custom Sorting

2014-06-25 Thread Sandeep Khanzode
Hi, Thanks for your reply.  Actually, I am evaluating both approaches. With the sort being performed on a field indexed in Lucene itself, my concern is with the FieldCache. Very quickly, for multiple clients executing in parallel, it bumps up to 8-10GB. This is for 4-5 different Sort fields usi

Re: Custom Sorting

2014-06-24 Thread Erick Erickson
I'm a little confused here. Sure, sorting on a number of fields will increase memory, the basic idea here is that you need to cache all the sort values (plus support structures) for performance reasons. If you create your own custom sort that goes out to a DB and gets the doc, you have to be prepa

Custom Sorting

2014-06-24 Thread Sandeep Khanzode
Hi, I am trying to implement a sort order for search results in Lucene 4.7.2. If I want to use data for ordering that is not stored in Lucene as Fields, is there any way this can be done? Basically, I would have certain data that is associated logically to a document but stored elsewhere, like

Custom sorting

2009-11-17 Thread Ganesh
Hello all, I am having millions of records in the database and in that 75% of the records required to be sorted. Does 2.9 provides facility to do custom sorting (Avoid loading all records) ? Regards Ganesh Send instant messages to your online friends http://in.messenger.yahoo.com

Re: Custom sorting!

2009-06-05 Thread Ian Lea
ohnson'. > > can somebody suggest wht's going wrong here. > > Vanshi > > > vanshi wrote: >> >> I am doing custom sorting within lucene using overloaded >> searcher.search(query, sort). First precedence is to sort based on 'last &

Re: Custom sorting!

2009-06-05 Thread vanshi
uld expect 'JAHN' to come before 'johnson'. can somebody suggest wht's going wrong here. Vanshi vanshi wrote: > > I am doing custom sorting within lucene using overloaded > searcher.search(query, sort). First precedence is to sort based on 'last >

Custom sorting!

2009-06-04 Thread vanshi
I am doing custom sorting within lucene using overloaded searcher.search(query, sort). First precedence is to sort based on 'last name' and then on 'network status', where 'INN' is better than 'OUT'. Fields are stored in the indexes like this: FIRST_N

Re: Custom Sorting Based on Input Value

2008-10-14 Thread Chris Hostetter
: 3> maybe you could provide a custom sorter by using : SortComparator, although you should look at the warnings : in the API. : : Now I'll wait for Hoss to say "Isn't that what XXX provides" ... I can't think of anything that would solve this problem direclty, mianly because i can't think of a

Re: Custom Sorting Based on Input Value

2008-10-14 Thread Erick Erickson
ically, Say I am sorting on field A. I want all values > matching value '5' on top and then regular sorting for other values. So I > would like to do something like: sort by: fieldA(5). > > Any recommendation how I can achieve this using Lucene. > > thanks, > Ravi > -

Custom Sorting Based on Input Value

2008-10-13 Thread Ravis
ld like to do something like: sort by: fieldA(5). Any recommendation how I can achieve this using Lucene. thanks, Ravi -- View this message in context: http://www.nabble.com/Custom-Sorting-Based-on-Input-Value-tp19963673p19963673.html Sent from the Lucene - Java Users mailing list archive at

Re: Custom sorting - memory leaks

2007-07-06 Thread Xiaocheng Luan
Intentionally copied the subject line of this thread (from last August), and an email from the thread is attached at the end of this email - I ran into similar problems in custom sorting (memory leak due to caching) - the subject has been well discussed in the thread but just want to add a

Re: Advice on Custom Sorting

2006-09-26 Thread Paul Lynch
Thanks again Erick for taking the time. I agree that the CachingWrapperFilter as described under "using a custom filter" in LIA is probably my best bet. I wanted to check if anything had been added in Lucene releases since the book was written I wasn't aware of. Cheers again. --- Erick Erickson

Re: Advice on Custom Sorting

2006-09-25 Thread Erick Erickson
You were probably right. See below On 9/25/06, Paul Lynch <[EMAIL PROTECTED]> wrote: Thanks for the quick response Erick. "index the documents in your preferred list with a field and index your non-preferred docs with a field subid?" I considered this approach and dismissed it due to the

Re: Advice on Custom Sorting

2006-09-25 Thread Paul Lynch
Thanks for the quick response Erick. "index the documents in your preferred list with a field and index your non-preferred docs with a field subid?" I considered this approach and dismissed it due to the actual list of preferred ids changing so frequently (every 10 mins...ish) but maybe I was a

Re: Advice on Custom Sorting

2006-09-25 Thread Erick Erickson
OK, a really "off the top of my head" response, but what the heck I'm not sure you need to worry about filters. Would it work for you to index the documents in your preferred list with a field (called, at the limit of my creativity, preferredsubid ) and index your non-preferred docs with a f

Advice on Custom Sorting

2006-09-25 Thread Paul Lynch
Hi All, I have an index containing documents which all have a field called SubId which holds the ID of the Subscriber that submitted the data. This field is STORED and UN_TOKENIZED When I am querying the index, the user can cloose a number of different ways to sort the Hits. The problem is that I

Re: Custom Sorting

2006-02-20 Thread Michael D. Curtin
SOME ONE wrote: Hi, Yes, my queries are like the first case. And as there have been no other suggestions to do it in a single search operation, will have to do it the way you suggested. This technique will do the job particularly because title's text is always in the body as well. So finally I

Re: Custom Sorting

2006-02-20 Thread SOME ONE
Hi, Yes, my queries are like the first case. And as there have been no other suggestions to do it in a single search operation, will have to do it the way you suggested. This technique will do the job particularly because title's text is always in the body as well. So finally I will have to run tw

Re: Custom Sorting

2006-02-18 Thread Michael D. Curtin
I'm not sure you can do what you want in a single search. But, I'm not sure I actually understand what your queries look like, either. I *think* you want to search like (title:a OR body:a) AND (title:b OR body:b) AND (title:c OR body:c) not something like (title:a OR title:b OR title:c) AND

Re: Custom Sorting

2006-02-18 Thread SOME ONE
Hi, Well, I gave more thought to your suggestion and came to the conclusion that I can not even run 2 searches. The reason being, as I mentioned in my first message, I am using MultiFieldQueryParser to search title and body fields. Search terms can be found anywhere, either in title or body or bot

Re: Custom Sorting

2006-02-18 Thread Michael D. Curtin
SOME ONE wrote: Yes, I could run two searches, but that means running two searches for each request from user and that I think doubles the job taking double time. Any suggestions to do it more efficiently please ? I think it would only take double time if the sets of hit documents have substa

Re: Custom Sorting

2006-02-18 Thread SOME ONE
Hi, Yes, I could run two searches, but that means running two searches for each request from user and that I think doubles the job taking double time. Any suggestions to do it more efficiently please ? Thanks and Regards Wiseman --- "Michael D. Curtin" <[EMAIL PROTECTED]> wrote: > SOME ONE wro

Re: Custom Sorting

2006-02-17 Thread Michael D. Curtin
SOME ONE wrote: Hi, I am using MultiFieldQueryParser (Lucene 1.9) to search title and body fields in the documents. The requirement is that documents with title match should be returned before the documents with body match. Using the default scoring, title matches do come before the body matche

Custom Sorting

2006-02-17 Thread SOME ONE
Hi, I am using MultiFieldQueryParser (Lucene 1.9) to search title and body fields in the documents. The requirement is that documents with title match should be returned before the documents with body match. Using the default scoring, title matches do come before the body matches. But, I also need

Re: Help with custom sorting - ignoring case on string fields.

2005-07-06 Thread ian parkin
d no complex > > sorting abilities, so I wrote my own code to do this using a > TreeMap > > and Comparator. The sorting was basically lower case comparisons > of > > strings with a few extra little tweaks here and there. > > > > This past weekend I upgraded to 1.4.3 o

Re: Help with custom sorting - ignoring case on string fields.

2005-07-06 Thread Erik Hatcher
. The sorting was basically lower case comparisons of strings with a few extra little tweaks here and there. This past weekend I upgraded to 1.4.3 of Lucene and am looking for some help with custom sorting code. My application stores a couple of mixed-case text fields 'author' and '

Help with custom sorting - ignoring case on string fields.

2005-07-06 Thread ian parkin
upgraded to 1.4.3 of Lucene and am looking for some help with custom sorting code. My application stores a couple of mixed-case text fields 'author' and 'title' as Field.Text and I would like to sort on these fields in a case insensitive manner. I have been looking at the Dist