Package org.apache.lucene.search

Examples of org.apache.lucene.search.TermRangeQuery.rewrite()


    public Query rewrite(IndexReader reader) throws IOException {
        if (transform == TRANSFORM_NONE) {
            Query stdRangeQueryImpl
                    = new TermRangeQuery(lowerTerm.field(), lowerTerm.text(), upperTerm.text(), inclusive, inclusive);
            try {
                stdRangeQuery = stdRangeQueryImpl.rewrite(reader);
                return stdRangeQuery;
            } catch (BooleanQuery.TooManyClauses e) {
                log.debug("Too many terms to enumerate, using custom RangeQuery");
                // failed, use own implementation
                return this;
View Full Code Here


    public Query rewrite(IndexReader reader) throws IOException {
        if (transform == TRANSFORM_NONE) {
            Query stdRangeQueryImpl
                    = new TermRangeQuery(lowerTerm.field(), lowerTerm.text(), upperTerm.text(), inclusive, inclusive);
            try {
                stdRangeQuery = stdRangeQueryImpl.rewrite(reader);
                return stdRangeQuery;
            } catch (BooleanQuery.TooManyClauses e) {
                log.debug("Too many terms to enumerate, using custom RangeQuery");
                // failed, use own implementation
                return this;
View Full Code Here

                    lowerTerm.field(), lowerTerm.text(), upperTerm.text(),
                    inclusive, inclusive);
            stdRangeQueryImpl
                    .setRewriteMethod(MultiTermQuery.CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE);
            try {
                stdRangeQuery = stdRangeQueryImpl.rewrite(reader);
                return stdRangeQuery;
            } catch (BooleanQuery.TooManyClauses e) {
                log.debug("Too many terms to enumerate, using custom RangeQuery");
                // failed, use own implementation
                return this;
View Full Code Here

      {
         Query stdRangeQueryImpl =
            new TermRangeQuery(lowerTerm.field(), lowerTerm.text(), upperTerm.text(), inclusive, inclusive);
         try
         {
            stdRangeQuery = stdRangeQueryImpl.rewrite(reader);
            return stdRangeQuery;
         }
         catch (BooleanQuery.TooManyClauses e)
         {
            // failed, use own implementation
View Full Code Here

      {
         Query stdRangeQueryImpl =
            new TermRangeQuery(lowerTerm.field(), lowerTerm.text(), upperTerm.text(), inclusive, inclusive);
         try
         {
            stdRangeQuery = stdRangeQueryImpl.rewrite(reader);
            return stdRangeQuery;
         }
         catch (BooleanQuery.TooManyClauses e)
         {
            // failed, use own implementation
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.