lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <li...@ehatchersolutions.com>
Subject Re: SearchBean in action?
Date Mon, 20 Jan 2003 13:48:14 GMT
On Sunday, January 19, 2003, at 11:17  PM, Terry Steichen wrote:
> I've recently made some specific additional changes (regarding 
> scoring, as I
> recall).  At this point I don't recall which of these have been 
> included in
> the distribution and which have not.

I'm using the latest CVS HEAD version of the searchbean codebase, just 
for comparisons sake.

> However, since then I've been using SearchBean extensively and, my 
> version
> at least, works fine for sorting in either ascending or descending 
> date (or
> relevance) order on whatever field I choose.

How are you switching between ascending and descending sort?

In HitsIterator, its hardcoded to a particular field.  Why?  I've 
removed this restriction and here is the diff:

      public HitsIterator(Hits hits, String sortFlag) throws IOException{
          this.hitsCollection = hits;
          if (sortFlag != null){
-            if ((sortFlag != "") && 
(sortFlag.equals(SearchBean.SORT_FIELD_RELEVANCE))){
-                //logger.debug("Sorting hits by field "+sortFlag);
+            if (sortFlag != "") {
+                System.out.println("Sorting hits by field "+sortFlag);
                  sortByField(sortFlag);
                  //logger.debug("Completed sorting by field "+sortFlag);
              }



> Please let me know what kind of problems you're having and I'll see if 
> I can
> help.

SearchBean itself is hardcoded to the StandardAnalyzer.  To be 
generally useful this needs to be made configurable.

Those were the main issues I've had.  I'm assuming you've made changes 
in your version of SearchBean to account for at least the field name to 
sort on, or you're always using "relevance" :)

	Erik


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message