fixed javadoc typo and added helpful diagnostic toString methods

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@156599 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2005-03-09 03:02:46 +00:00
parent 270e1dc91c
commit 835871eedc
2 changed files with 12 additions and 2 deletions

View File

@ -27,7 +27,13 @@ public class BooleanClause implements java.io.Serializable {
// typesafe enum pattern, no public constructor
super(name);
}
public String toString() {
if (this == MUST) return "+";
if (this == MUST_NOT) return "-";
return "";
}
/** Use this operator for terms that <i>must</i> appear in the matching documents. */
public static final Occur MUST = new Occur("MUST");
/** Use this operator for terms of which <i>should</i> appear in the
@ -150,4 +156,8 @@ public class BooleanClause implements java.io.Serializable {
return query.hashCode() ^ (this.required?1:0) ^ (this.prohibited?2:0);
}
public String toString() {
return occur.toString() + query.toString();
}
}

View File

@ -72,7 +72,7 @@ public class BooleanQuery extends Query {
*
* {@link Similarity#coord(int,int)} may be disabled in scoring, as
* appropriate. For example, this score factor does not make sense for most
* automatically generated queries, like {@link WildCardQuery} and {@link
* automatically generated queries, like {@link WildcardQuery} and {@link
* FuzzyQuery}.
*
* @param disableCoord disables {@link Similarity#coord(int,int)} in scoring.