lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r155612 - incubator/lucene4c/trunk/src/search/scorer.c
Date Sun, 27 Feb 2005 02:04:34 GMT
Author: rooneg
Date: Sat Feb 26 18:04:34 2005
New Revision: 155612

URL: http://svn.apache.org/viewcvs?view=rev&rev=155612
Log:
Remove ugly hack from the boolean scorer code, I figured out the problem.

* src/search/scorer.c
  (lcn_boolean_scorer_create): the arrays store pointers to scorers, not
   scorers.
  (fill_scorers_array): use APR_ARRAY_PUSH, it works now that the arrays
   are storing the correct size elements.

Modified:
    incubator/lucene4c/trunk/src/search/scorer.c

Modified: incubator/lucene4c/trunk/src/search/scorer.c
URL: http://svn.apache.org/viewcvs/incubator/lucene4c/trunk/src/search/scorer.c?view=diff&r1=155611&r2=155612
==============================================================================
--- incubator/lucene4c/trunk/src/search/scorer.c (original)
+++ incubator/lucene4c/trunk/src/search/scorer.c Sat Feb 26 18:04:34 2005
@@ -151,13 +151,7 @@
                                  index,
                                  pool));
 
-      /* XXX it is unclear why using APR_ARRAY_PUSH doesn't work... */
-#ifdef FIGUREMEOUT
       APR_ARRAY_PUSH (scorer_array, lcn_scorer_t *) = scorer;
-#else
-      APR_ARRAY_IDX (scorer_array, i, lcn_scorer_t *) = scorer;
-      scorer_array->nelts = i + 1;
-#endif
     }
 
   return LCN_NO_ERROR;
@@ -179,19 +173,19 @@
 
   bsb->must = apr_array_make (pool,
                               must->nelts,
-                              sizeof (lcn_scorer_t));
+                              sizeof (lcn_scorer_t *));
 
   LCN_ERR (fill_scorers_array (must, bsb->must, index, pool));
 
   bsb->should = apr_array_make (pool,
                                 should->nelts,
-                                sizeof (lcn_scorer_t));
+                                sizeof (lcn_scorer_t *));
 
   LCN_ERR (fill_scorers_array (should, bsb->should, index, pool));
 
   bsb->must_not = apr_array_make (pool,
                                   must_not->nelts,
-                                  sizeof (lcn_scorer_t));
+                                  sizeof (lcn_scorer_t *));
 
   LCN_ERR (fill_scorers_array (must_not, bsb->must_not, index, pool));
 



Mime
View raw message