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
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
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
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
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
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
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
&
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
>
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
: 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
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
> -
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
. 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
'
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
29 matches
Mail list logo