lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/search BooleanQuery.java Hits.java IndexSearcher.java MultiSearcher.java Searchable.java
Date Tue, 14 Jan 2003 00:04:38 GMT
cutting     2003/01/13 16:04:38

  Modified:    src/java/org/apache/lucene/search BooleanQuery.java
                        Hits.java IndexSearcher.java MultiSearcher.java
                        Searchable.java
  Log:
  Fixed minor problems with previous checkin.
  
  Revision  Changes    Path
  1.8       +2 -2      jakarta-lucene/src/java/org/apache/lucene/search/BooleanQuery.java
  
  Index: BooleanQuery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/BooleanQuery.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BooleanQuery.java	13 Jan 2003 23:50:33 -0000	1.7
  +++ BooleanQuery.java	14 Jan 2003 00:04:37 -0000	1.8
  @@ -173,7 +173,7 @@
     /** Prints a user-readable version of this query. */
     public String toString(String field) {
       StringBuffer buffer = new StringBuffer();
  -    if (getBoost() > 1.0) {
  +    if (getBoost() != 1.0) {
         buffer.append("(");
       }
   
  @@ -196,7 +196,7 @@
   	buffer.append(" ");
       }
   
  -    if (getBoost() > 1.0) {
  +    if (getBoost() != 1.0) {
         buffer.append(")^");
         buffer.append(getBoost());
       }
  
  
  
  1.5       +2 -2      jakarta-lucene/src/java/org/apache/lucene/search/Hits.java
  
  Index: Hits.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/Hits.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Hits.java	13 Jan 2003 23:50:33 -0000	1.4
  +++ Hits.java	14 Jan 2003 00:04:37 -0000	1.5
  @@ -93,8 +93,8 @@
       ScoreDoc[] scoreDocs = topDocs.scoreDocs;
   
       float scoreNorm = 1.0f;
  -//     if (length > 0 && scoreDocs[0].score > 1.0f)
  -//       scoreNorm = 1.0f / scoreDocs[0].score;
  +    if (length > 0 && scoreDocs[0].score > 1.0f)
  +      scoreNorm = 1.0f / scoreDocs[0].score;
   
       int end = scoreDocs.length < length ? scoreDocs.length : length;
       for (int i = hitDocs.size(); i < end; i++)
  
  
  
  1.6       +0 -2      jakarta-lucene/src/java/org/apache/lucene/search/IndexSearcher.java
  
  Index: IndexSearcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/IndexSearcher.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IndexSearcher.java	13 Jan 2003 23:50:33 -0000	1.5
  +++ IndexSearcher.java	14 Jan 2003 00:04:37 -0000	1.6
  @@ -187,7 +187,6 @@
       scorer.score(collector, reader.maxDoc());
     }
   
  -  /** */
     public Query rewrite(Query original) throws IOException {
       Query query = original;
       for (Query rewrittenQuery = query.rewrite(reader); rewrittenQuery != query;
  @@ -197,7 +196,6 @@
       return query;
     }
   
  -  /** */
     public Explanation explain(Query query, int doc) throws IOException {
       return query.weight(this).scorer(reader).explain(doc);
     }
  
  
  
  1.9       +0 -3      jakarta-lucene/src/java/org/apache/lucene/search/MultiSearcher.java
  
  Index: MultiSearcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/MultiSearcher.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MultiSearcher.java	13 Jan 2003 23:50:33 -0000	1.8
  +++ MultiSearcher.java	14 Jan 2003 00:04:37 -0000	1.9
  @@ -204,7 +204,6 @@
       }
     }
     
  -  /** */
     public Query rewrite(Query original) throws IOException {
       Query[] queries = new Query[searchables.length];
       for (int i = 0; i < searchables.length; i++) {
  @@ -213,8 +212,6 @@
       return original.combine(queries);
     }
   
  -
  -  /** */
     public Explanation explain(Query query, int doc) throws IOException {
       int i = subSearcher(doc);			  // find searcher index
       return searchables[i].explain(query,doc-starts[i]); // dispatch to searcher
  
  
  
  1.5       +9 -2      jakarta-lucene/src/java/org/apache/lucene/search/Searchable.java
  
  Index: Searchable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/Searchable.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Searchable.java	13 Jan 2003 23:50:33 -0000	1.4
  +++ Searchable.java	14 Jan 2003 00:04:37 -0000	1.5
  @@ -113,10 +113,17 @@
      */
     Document doc(int i) throws IOException;
   
  -  /** */
  +  /** Expert: called to re-write queries into primitive queries. */
     Query rewrite(Query query) throws IOException;
   
  -  /** */
  +  /** Returns an Explanation that describes how <code>doc</code> scored against
  +   * <code>query</code>.
  +   *
  +   * <p>This is intended to be used in developing Similarity implementations,
  +   * and, for good performance, should not be displayed with every hit.
  +   * Computing an explanation is as expensive as executing the query over the
  +   * entire index.
  +   */
     Explanation explain(Query query, int doc) throws IOException;
   
   
  
  
  

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


Mime
View raw message