Example usage for org.apache.lucene.queryparser.flexible.core.nodes FieldQueryNode getText

List of usage examples for org.apache.lucene.queryparser.flexible.core.nodes FieldQueryNode getText

Introduction

In this page you can find the example usage for org.apache.lucene.queryparser.flexible.core.nodes FieldQueryNode getText.

Prototype

@Override
public CharSequence getText() 

Source Link

Document

Returns the term.

Usage

From source file:com.sindicetech.siren.qparser.keyword.processors.WildcardNodeQueryNodeProcessor.java

License:Open Source License

/**
 * Return <code>true</code> if the {@link QueryNode} is a {@link FieldQueryNode},
 * which text is equal to "*"./*from   www . j  a v  a2 s . com*/
 */
private boolean isEmptyNode(final QueryNode q) {
    if (q instanceof FieldQueryNode) {
        final FieldQueryNode fq = (FieldQueryNode) q;
        final CharSequence text = fq.getText();
        if (text != null && text.length() == 1 && text.charAt(0) == '*') {
            return true;
        }
    }
    return false;
}