lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: arbitrary sorting
Date Fri, 23 Jan 2004 15:53:02 GMT
I like the simplicity of this API, and don't mind the restriction of
requiring that sortable fields contain single Integer value.

However, I could not compile your code:


        [javac] Found 1 semantic error compiling
"/home/otis/cvs-repo/jakarta-lucene/src/java/org/apache/lucene/search/SortedIndexSearcher.java":
 
    [javac]                         <-------------
    [javac]    182.                 scorer.score (
    [javac]    . . .
    [javac]    191.                         }, reader.maxDoc());
    [javac]         ------------------------------------------>
    [javac] *** Semantic Error: No applicable overload for the method
named "score" was found in type "org.apache.lucene.search.Scorer".
Perhaps you wanted the overloaded version "void
score(org.apache.lucene.search.HitCollector $1) throws
java.io.IOException;" instead?


I have a feeling that this contribution may be small enough and focused
on solving one of the frequently asked for features, that it may be
best to include these two classes in the core Lucene.

Thanks and I'm looking forward to the fix, so I can test this out.
Oh, great Javadocs!  If you can write a unit test that shows that this
actually works, that would be great.

Otis



--- Tim Jones <tjones@hoovers.com> wrote:
> (second try)
> 
> --
> 
> Erik et al,
> 
> In the attached .zip are the files implementing the functionality I 
> described.  I ended up just putting the classes in the 
> org.apache.lucene.search package - that makes the constructor problem
> I 
> mentioned not an issue.  Therefore there's not a bug to post the code
> 
> against, so I'm just attaching it here.  Let me know if there is 
> something else I should do.
> 
> For reference, it was the org.apache.lucene.search.TopDocs which was
> the 
> problem - I needed to call it from the SortedIndexSearcher I created,
> 
> but it can't be called from outside the org.apache.lucene.search
> package.
> 
> The class to look at is org.apache.lucene.search.SortedIndexSearcher.
> 
> It contains some basic informatin about how to use it.
> 
> I call this v0.1 because there are some constraints on the fields
> used 
> to sort - they must contain a single term which is an integer value. 
> If 
> what I've done looks like a good direction to take in the API,
> though, 
> it would be possible to make the code able to handle arbitrary term 
> values, with a little worse performance.
> 
> Tim
> 
> 
>  > -----Original Message-----
>  > From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
>  > Sent: Monday, January 05, 2004 12:56 PM
>  > To: Lucene List
>  > Subject: Re: making a contribution
>  >
>  >
>  > This is great news!
>  >
>  > Please attach your new files to a new Bugzilla issue for Lucene
> (see
>  > Jakarta website for details) and either submit a 'cvs diff -u'
> patch
>  > file along with the issue or just describe what constructor needed
> to
>  > be opened up to public in the issue text.
>  >
>  > Where your contribution would ultimately reside is unclear.  At
> the
>  > very least, it can live in the sandbox if you are ok with making
> it
>  > Apache Software License.
>  >
>  > 	Erik
>  >
>  > On Jan 5, 2004, at 1:07 PM, Tim Jones wrote:
>  >
>  > >
>  > > I've come up with an implementation for doing arbitrary sorting
> in
>  > > lucene -
>  > > it is an implementation of PriorityQueue that can sort by
>  > an arbitrary
>  > > field
>  > > as well as the computed relevancy.  It is quite speedy and
>  > should be
>  > > faster
>  > > than doing a sort in the appplication after getting the
>  > results back
>  > > from
>  > > lucene.
>  > >
>  > > I thought I'd make this available to the lucene community - what
> is
>  > > the best
>  > > way to do this?  Should it go in "Contributions", or "Sandbox"?
>  > >
>  > > The meat of it for version 0.1 is four classes which
>  > subclass existing
>  > > lucene classes, and one modification to an existing lucene class
> to
>  > > make the
>  > > constructor public so it can be subclassed.  So really what
>  > it means is
>  > > adding additional API by "jar -uf lucene.jar ..."
>  > >
>  > > Tim
> 
> 
> 

> ATTACHMENT part 2 application/zip name=SortedIndexSearcher_v0.1.zip
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message