Methods Summary |
---|
public void | addSpanQueries(SpanNearClauseFactory sncf)
visitMatchingTerms(
sncf.getIndexReader(),
sncf.getFieldName(),
new MatchingTermVisitor() {
public void visitMatchingTerm(Term term) throws IOException {
sncf.addTermWeighted(term, getWeight());
}
});
|
public int | compareTo(java.lang.Object o)
/* for ordering terms and prefixes before using an index, not used */
SimpleTerm ost = (SimpleTerm) o;
return this.toStringUnquoted().compareTo( ost.toStringUnquoted());
|
public java.lang.String | distanceSubQueryNotAllowed()return null;
|
public java.lang.String | getFieldOperator()return "/";
|
public java.lang.String | getQuote()return "\"";
|
boolean | isQuoted()return quoted;
|
public org.apache.lucene.search.Query | makeLuceneQueryFieldNoBoost(java.lang.String fieldName, BasicQueryFactory qf)
return new Query() {
public String toString(String fn) {
return getClass().toString() + " " + fieldName + " (" + fn + "?)";
}
public Query rewrite(IndexReader reader) throws IOException {
final ArrayList luceneSubQueries = new ArrayList();
visitMatchingTerms( reader, fieldName,
new MatchingTermVisitor() {
public void visitMatchingTerm(Term term) throws IOException {
luceneSubQueries.add(qf.newTermQuery(term));
}
});
return (luceneSubQueries.size() == 0) ? SrndQuery.theEmptyLcnQuery
: (luceneSubQueries.size() == 1) ? (Query) luceneSubQueries.get(0)
: SrndBooleanQuery.makeBooleanQuery(
/* luceneSubQueries all have default weight */
luceneSubQueries, BooleanClause.Occur.SHOULD); /* OR the subquery terms */
}
};
|
protected void | suffixToString(java.lang.StringBuffer r);
|
public java.lang.String | toString()
StringBuffer r = new StringBuffer();
if (isQuoted()) {
r.append(getQuote());
}
r.append(toStringUnquoted());
if (isQuoted()) {
r.append(getQuote());
}
suffixToString(r);
weightToString(r);
return r.toString();
|
public abstract java.lang.String | toStringUnquoted()
|
public abstract void | visitMatchingTerms(org.apache.lucene.index.IndexReader reader, java.lang.String fieldName, org.apache.lucene.queryParser.surround.query.SimpleTerm$MatchingTermVisitor mtv)
|