lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/search TermScorer.java PhrasePositions.java FieldDocSortedHitQueue.java SloppyPhraseScorer.java ConjunctionScorer.java FilteredTermEnum.java BooleanScorer.java PhraseScorer.java
Date Fri, 06 Aug 2004 20:19:13 GMT
dnaber      2004/08/06 13:19:13

  Modified:    src/java/org/apache/lucene/search TermScorer.java
                        PhrasePositions.java FieldDocSortedHitQueue.java
                        SloppyPhraseScorer.java ConjunctionScorer.java
                        FilteredTermEnum.java BooleanScorer.java
                        PhraseScorer.java
  Log:
  remove "throws IOException" from methods that really never throw this exception
  
  Revision  Changes    Path
  1.11      +2 -2      jakarta-lucene/src/java/org/apache/lucene/search/TermScorer.java
  
  Index: TermScorer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/TermScorer.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TermScorer.java	25 Jul 2004 15:10:36 -0000	1.10
  +++ TermScorer.java	6 Aug 2004 20:19:12 -0000	1.11
  @@ -36,7 +36,7 @@
     private float[] scoreCache = new float[SCORE_CACHE_SIZE];
   
     TermScorer(Weight weight, TermDocs td, Similarity similarity,
  -             byte[] norms) throws IOException {
  +             byte[] norms) {
       super(similarity);
       this.weight = weight;
       this.termDocs = td;
  @@ -65,7 +65,7 @@
       return true;
     }
   
  -  public float score() throws IOException {
  +  public float score() {
       int f = freqs[pointer];
       float raw =                                   // compute tf(f)*weight
         f < SCORE_CACHE_SIZE			  // check cache
  
  
  
  1.4       +1 -1      jakarta-lucene/src/java/org/apache/lucene/search/PhrasePositions.java
  
  Index: PhrasePositions.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/PhrasePositions.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PhrasePositions.java	29 Mar 2004 22:48:03 -0000	1.3
  +++ PhrasePositions.java	6 Aug 2004 20:19:12 -0000	1.4
  @@ -27,7 +27,7 @@
     TermPositions tp;				  // stream of positions
     PhrasePositions next;				  // used to make lists
   
  -  PhrasePositions(TermPositions t, int o) throws IOException {
  +  PhrasePositions(TermPositions t, int o) {
       tp = t;
       offset = o;
     }
  
  
  
  1.6       +2 -5      jakarta-lucene/src/java/org/apache/lucene/search/FieldDocSortedHitQueue.java
  
  Index: FieldDocSortedHitQueue.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/FieldDocSortedHitQueue.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FieldDocSortedHitQueue.java	24 May 2004 22:51:42 -0000	1.5
  +++ FieldDocSortedHitQueue.java	6 Aug 2004 20:19:12 -0000	1.6
  @@ -18,7 +18,6 @@
   
   import org.apache.lucene.util.PriorityQueue;
   
  -import java.io.IOException;
   import java.text.Collator;
   import java.util.Locale;
   
  @@ -48,10 +47,8 @@
   	 * Creates a hit queue sorted by the given list of fields.
   	 * @param fields Field names, in priority order (highest priority first).
   	 * @param size  The number of hits to retain.  Must be greater than zero.
  -	 * @throws IOException
   	 */
  -	FieldDocSortedHitQueue (SortField[] fields, int size)
  -	throws IOException {
  +	FieldDocSortedHitQueue (SortField[] fields, int size) {
   		this.fields = fields;
   		this.collators = hasCollators (fields);
   		initialize (size);
  
  
  
  1.7       +1 -1      jakarta-lucene/src/java/org/apache/lucene/search/SloppyPhraseScorer.java
  
  Index: SloppyPhraseScorer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/SloppyPhraseScorer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SloppyPhraseScorer.java	29 Mar 2004 22:48:04 -0000	1.6
  +++ SloppyPhraseScorer.java	6 Aug 2004 20:19:12 -0000	1.7
  @@ -24,7 +24,7 @@
       private int slop;
   
       SloppyPhraseScorer(Weight weight, TermPositions[] tps, Similarity similarity,
  -                       int slop, byte[] norms) throws IOException {
  +                       int slop, byte[] norms) {
           super(weight, tps, similarity, norms);
           this.slop = slop;
       }
  
  
  
  1.5       +3 -3      jakarta-lucene/src/java/org/apache/lucene/search/ConjunctionScorer.java
  
  Index: ConjunctionScorer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/ConjunctionScorer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConjunctionScorer.java	11 May 2004 17:18:03 -0000	1.4
  +++ ConjunctionScorer.java	6 Aug 2004 20:19:12 -0000	1.5
  @@ -30,7 +30,7 @@
       super(similarity);
     }
   
  -  final void add(Scorer scorer) throws IOException {
  +  final void add(Scorer scorer) {
       scorers.addLast(scorer);
     }
   
  @@ -92,7 +92,7 @@
       firstTime = false;
     }
   
  -  private void sortScorers() throws IOException {
  +  private void sortScorers() {
       // move scorers to an array
       Scorer[] array = (Scorer[])scorers.toArray(new Scorer[scorers.size()]);
       scorers.clear();                              // empty the list
  @@ -112,7 +112,7 @@
       }
     }
   
  -  public Explanation explain(int doc) throws IOException {
  +  public Explanation explain(int doc) {
       throw new UnsupportedOperationException();
     }
   
  
  
  
  1.6       +1 -1      jakarta-lucene/src/java/org/apache/lucene/search/FilteredTermEnum.java
  
  Index: FilteredTermEnum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/FilteredTermEnum.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FilteredTermEnum.java	10 Jul 2004 06:19:01 -0000	1.5
  +++ FilteredTermEnum.java	6 Aug 2004 20:19:12 -0000	1.6
  @@ -28,7 +28,7 @@
       private Term currentTerm = null;
       private TermEnum actualEnum = null;
       
  -    public FilteredTermEnum() throws IOException {}
  +    public FilteredTermEnum() {}
   
       /** Equality compare on the term */
       protected abstract boolean termCompare(Term term);
  
  
  
  1.10      +4 -4      jakarta-lucene/src/java/org/apache/lucene/search/BooleanScorer.java
  
  Index: BooleanScorer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/BooleanScorer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BooleanScorer.java	11 May 2004 19:59:51 -0000	1.9
  +++ BooleanScorer.java	6 Aug 2004 20:19:12 -0000	1.10
  @@ -77,7 +77,7 @@
   			    bucketTable.newCollector(mask), scorers);
     }
   
  -  private final void computeCoordFactors() throws IOException {
  +  private final void computeCoordFactors() {
       coordFactors = new float[maxCoord];
       for (int i = 0; i < maxCoord; i++)
         coordFactors[i] = getSimilarity().coord(i, maxCoord-1);
  @@ -120,7 +120,7 @@
       return false;
     }
   
  -  public float score() throws IOException {
  +  public float score() {
       if (coordFactors == null)
         computeCoordFactors();
       return current.score * coordFactors[current.coord];
  @@ -185,11 +185,11 @@
       }
     }
   
  -  public boolean skipTo(int target) throws IOException {
  +  public boolean skipTo(int target) {
       throw new UnsupportedOperationException();
     }
   
  -  public Explanation explain(int doc) throws IOException {
  +  public Explanation explain(int doc) {
       throw new UnsupportedOperationException();
     }
   
  
  
  
  1.15      +1 -1      jakarta-lucene/src/java/org/apache/lucene/search/PhraseScorer.java
  
  Index: PhraseScorer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/PhraseScorer.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- PhraseScorer.java	11 May 2004 17:18:04 -0000	1.14
  +++ PhraseScorer.java	6 Aug 2004 20:19:13 -0000	1.15
  @@ -33,7 +33,7 @@
     private float freq;
   
     PhraseScorer(Weight weight, TermPositions[] tps, Similarity similarity,
  -               byte[] norms) throws IOException {
  +               byte[] norms) {
       super(similarity);
       this.norms = norms;
       this.weight = weight;
  
  
  

---------------------------------------------------------------------
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