lucene-core-2.9.4-dev

e/lucene/search/Filter;)V
    //   112: astore 9
    //   114: aload 9
    //   116: aload_2
    //   117: invokevirtual 22	org/apache/lucene/search/MultiTermQuery:getBoost	()F
    //   120: invokevirtual 23	org/apache/lucene/search/Query:setBoost	(F)V
    //   123: aload 9
    //   125: astore 10
    //   127: jsr +132 -> 259
    //   130: aload 10
    //   132: areturn
    //   133: aload 7
    //   135: invokevirtual 24	org/apache/lucene/search/FilteredTermEnum:next	()Z
    //   138: ifne +110 -> 248
    //   141: aload_3
    //   142: invokeinterface 25 1 0
    //   147: astore 9
    //   149: new 26	org/apache/lucene/search/BooleanQuery
    //   152: dup
    //   153: iconst_1
    //   154: invokespecial 27	org/apache/lucene/search/BooleanQuery:<init>	(Z)V
    //   157: astore 10
    //   159: aload 9
    //   161: invokeinterface 28 1 0
    //   166: ifeq +35 -> 201
    //   169: new 29	org/apache/lucene/search/TermQuery
    //   172: dup
    //   173: aload 9
    //   175: invokeinterface 30 1 0
    //   180: checkcast 31	org/apache/lucene/index/Term
    //   183: invokespecial 32	org/apache/lucene/search/TermQuery:<init>	(Lorg/apache/lucene/index/Term;)V
    //   186: astore 11
    //   188: aload 10
    //   190: aload 11
    //   192: getstatic 33	org/apache/lucene/search/BooleanClause$Occur:SHOULD	Lorg/apache/lucene/search/BooleanClause$Occur;
    //   195: invokevirtual 34	org/apache/lucene/search/BooleanQuery:add	(Lorg/apache/lucene/search/Query;Lorg/apache/lucene/search/BooleanClause$Occur;)V
    //   198: goto -39 -> 159
    //   201: new 18	org/apache/lucene/search/ConstantScoreQuery
    //   204: dup
    //   205: new 35	org/apache/lucene/search/QueryWrapperFilter
    //   208: dup
    //   209: aload 10
    //   211: invokespecial 36	org/apache/lucene/search/QueryWrapperFilter:<init>	(Lorg/apache/lucene/search/Query;)V
    //   214: invokespecial 21	org/apache/lucene/search/ConstantScoreQuery:<init>	(Lorg/apache/lucene/search/Filter;)V
    //   217: astore 11
    //   219: aload 11
    //   221: aload_2
    //   222: invokevirtual 22	org/apache/lucene/search/MultiTermQuery:getBoost	()F
    //   225: invokevirtual 23	org/apache/lucene/search/Query:setBoost	(F)V
    //   228: aload_2
    //   229: aload_3
    //   230: invokeinterface 17 1 0
    //   235: invokevirtual 37	org/apache/lucene/search/MultiTermQuery:incTotalNumberOfTerms	(I)V
    //   238: aload 11
    //   240: astore 12
    //   242: jsr +17 -> 259
    //   245: aload 12
    //   247: areturn
    //   248: goto -201 -> 47
    //   251: astore 13
    //   253: jsr +6 -> 259
    //   256: aload 13
    //   258: athrow
    //   259: astore 14
    //   261: aload 7
    //   263: invokevirtual 38	org/apache/lucene/search/FilteredTermEnum:close	()V
    //   266: ret 14
    // Line number table:
    //   Java source line #222	-> byte code offset #0
    //   Java source line #223	-> byte code offset #8
    //   Java source line #224	-> byte code offset #25
    //   Java source line #225	-> byte code offset #37
    //   Java source line #227	-> byte code offset #40
    //   Java source line #230	-> byte code offset #47
    //   Java source line #231	-> byte code offset #54
    //   Java source line #232	-> byte code offset #59
    //   Java source line #237	-> byte code offset #68
    //   Java source line #240	-> byte code offset #79
    //   Java source line #242	-> byte code offset #97
    //   Java source line #243	-> byte code offset #114
    //   Java source line #244	-> byte code offset #123
    //   Java source line #245	-> byte code offset #133
    //   Java source line #249	-> byte code offset #141
    //   Java source line #250	-> byte code offset #149
    //   Java source line #251	-> byte code offset #159
    //   Java source line #252	-> byte code offset #169
    //   Java source line #253	-> byte code offset #188
    //   Java source line #254	-> byte code offset #198
    //   Java source line #256	-> byte code offset #201
    //   Java source line #257	-> byte code offset #219
    //   Java source line #258	-> byte code offset #228
    //   Java source line #259	-> byte code offset #238
    //   Java source line #261	-> byte code offset #248
    //   Java source line #263	-> byte code offset #251
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	268	0	this	ConstantScoreAutoRewrite
    //   0	268	1	reader	org.apache.lucene.index.IndexReader
    //   0	268	2	query	MultiTermQuery
    //   7	223	3	pendingTerms	java.util.Collection
    //   23	70	4	docCountCutoff	int
    //   35	51	5	termCountLimit	int
    //   38	53	6	docVisitCount	int
    //   45	217	7	enumerator	FilteredTermEnum
    //   52	20	8	t	org.apache.lucene.index.Term
    //   112	12	9	result	Query
    //   147	27	9	it	java.util.Iterator
    //   125	6	10	localQuery1	Query
    //   157	53	10	bq	BooleanQuery
    //   186	5	11	tq	TermQuery
    //   217	22	11	result	Query
    //   240	6	12	localQuery2	Query
    //   251	6	13	localObject1	Object
    //   259	1	14	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   47	130	251	finally
    //   133	245	251	finally
    //   248	256	251	finally
  }
  
  public int hashCode()
  {
    int prime = 1279;
    return (int)(1279 * termCountCutoff + Double.doubleToLongBits(docCountPercent));
  }
  
  public boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (getClass() != obj.getClass()) {
      return false;
    }
    ConstantScoreAutoRewrite other = (ConstantScoreAutoRewrite)obj;
    if (termCountCutoff != termCountCutoff) {
      return false;
    }
    if (Double.doubleToLongBits(docCountPercent) != Double.doubleToLongBits(docCountPercent)) {
      return false;
    }
    return true;
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.MultiTermQuery.ConstantScoreAutoRewrite
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.io.IOException;
import java.io.Serializable;
import org.apache.lucene.index.IndexReader;

class MultiTermQuery$ConstantScoreBooleanQueryRewrite
  extends MultiTermQuery.ScoringBooleanQueryRewrite
  implements Serializable
{
  private MultiTermQuery$ConstantScoreBooleanQueryRewrite()
  {
    super(null);
  }
  
  MultiTermQuery$ConstantScoreBooleanQueryRewrite(MultiTermQuery.1 x0)
  {
    this();
  }
  
  public Query rewrite(IndexReader reader, MultiTermQuery query)
    throws IOException
  {
    Query result = new ConstantScoreQuery(new QueryWrapperFilter(super.rewrite(reader, query)));
    result.setBoost(query.getBoost());
    return result;
  }
  
  protected Object readResolve()
  {
    return MultiTermQuery.CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE;
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.MultiTermQuery.ConstantScoreBooleanQueryRewrite
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.io.Serializable;
import org.apache.lucene.index.IndexReader;

final class MultiTermQuery$ConstantScoreFilterRewrite
  extends MultiTermQuery.RewriteMethod
  implements Serializable
{
  MultiTermQuery$ConstantScoreFilterRewrite(MultiTermQuery.1 x0)
  {
    this();
  }
  
  public Query rewrite(IndexReader reader, MultiTermQuery query)
  {
    Query result = new ConstantScoreQuery(new MultiTermQueryWrapperFilter(query));
    result.setBoost(query.getBoost());
    return result;
  }
  
  protected Object readResolve()
  {
    return MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE;
  }
  
  private MultiTermQuery$ConstantScoreFilterRewrite() {}
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.MultiTermQuery.ConstantScoreFilterRewrite
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.io.IOException;
import java.io.Serializable;
import org.apache.lucene.index.IndexReader;

public abstract class MultiTermQuery$RewriteMethod
  implements Serializable
{
  public abstract Query rewrite(IndexReader paramIndexReader, MultiTermQuery paramMultiTermQuery)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.MultiTermQuery.RewriteMethod
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.io.IOException;
import java.io.Serializable;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;

class MultiTermQuery$ScoringBooleanQueryRewrite
  extends MultiTermQuery.RewriteMethod
  implements Serializable
{
  MultiTermQuery$ScoringBooleanQueryRewrite(MultiTermQuery.1 x0)
  {
    this();
  }
  
  public Query rewrite(IndexReader reader, MultiTermQuery query)
    throws IOException
  {
    FilteredTermEnum enumerator = query.getEnum(reader);
    BooleanQuery result = new BooleanQuery(true);
    int count = 0;
    try
    {
      do
      {
        Term t = enumerator.term();
        if (t != null)
        {
          TermQuery tq = new TermQuery(t);
          tq.setBoost(query.getBoost() * enumerator.difference());
          result.add(tq, BooleanClause.Occur.SHOULD);
          count++;
        }
      } while (enumerator.next());
    }
    finally
    {
      enumerator.close();
    }
    query.incTotalNumberOfTerms(count);
    return result;
  }
  
  protected Object readResolve()
  {
    return MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE;
  }
  
  private MultiTermQuery$ScoringBooleanQueryRewrite() {}
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.MultiTermQuery.ScoringBooleanQueryRewrite
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.io.IOException;
import java.io.Serializable;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.util.ToStringUtils;

public abstract class MultiTermQuery
  extends Query
{
  protected Term term;
  protected RewriteMethod rewriteMethod = CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
  transient int numberOfTerms = 0;
  
  public static abstract class RewriteMethod
    implements Serializable
  {
    public abstract Query rewrite(IndexReader paramIndexReader, MultiTermQuery paramMultiTermQuery)
      throws IOException;
  }
  
  private static final class ConstantScoreFilterRewrite
    extends MultiTermQuery.RewriteMethod
    implements Serializable
  {
    ConstantScoreFilterRewrite(MultiTermQuery.1 x0)
    {
      this();
    }
    
    public Query rewrite(IndexReader reader, MultiTermQuery query)
    {
      Query result = new ConstantScoreQuery(new MultiTermQueryWrapperFilter(query));
      result.setBoost(query.getBoost());
      return result;
    }
    
    protected Object readResolve()
    {
      return MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE;
    }
    
    private ConstantScoreFilterRewrite() {}
  }
  
  public static final RewriteMethod CONSTANT_SCORE_FILTER_REWRITE = new ConstantScoreFilterRewrite(null);
  
  private static class ScoringBooleanQueryRewrite
    extends MultiTermQuery.RewriteMethod
    implements Serializable
  {
    ScoringBooleanQueryRewrite(MultiTermQuery.1 x0)
    {
      this();
    }
    
    public Query rewrite(IndexReader reader, MultiTermQuery query)
      throws IOException
    {
      FilteredTermEnum enumerator = query.getEnum(reader);
      BooleanQuery result = new BooleanQuery(true);
      int count = 0;
      try
      {
        do
        {
          Term t = enumerator.term();
          if (t != null)
          {
            TermQuery tq = new TermQuery(t);
            tq.setBoost(query.getBoost() * enumerator.difference());
            result.add(tq, BooleanClause.Occur.SHOULD);
            count++;
          }
        } while (enumerator.next());
      }
      finally
      {
        enumerator.close();
      }
      query.incTotalNumberOfTerms(count);
      return result;
    }
    
    protected Object readResolve()
    {
      return MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE;
    }
    
    private ScoringBooleanQueryRewrite() {}
  }
  
  public static final RewriteMethod SCORING_BOOLEAN_QUERY_REWRITE = new ScoringBooleanQueryRewrite(null);
  
  private static class ConstantScoreBooleanQueryRewrite
    extends MultiTermQuery.ScoringBooleanQueryRewrite
    implements Serializable
  {
    private ConstantScoreBooleanQueryRewrite()
    {
      super();
    }
    
    ConstantScoreBooleanQueryRewrite(MultiTermQuery.1 x0)
    {
      this();
    }
    
    public Query rewrite(IndexReader reader, MultiTermQuery query)
      throws IOException
    {
      Query result = new ConstantScoreQuery(new QueryWrapperFilter(super.rewrite(reader, query)));
      result.setBoost(query.getBoost());
      return result;
    }
    
    protected Object readResolve()
    {
      return MultiTermQuery.CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE;
    }
  }
  
  public static final RewriteMethod CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE = new ConstantScoreBooleanQueryRewrite(null);
  
  public static class ConstantScoreAutoRewrite
    extends MultiTermQuery.RewriteMethod
    implements Serializable
  {
    public static int DEFAULT_TERM_COUNT_CUTOFF = 350;
    public static double DEFAULT_DOC_COUNT_PERCENT = 0.1D;
    private int termCountCutoff = DEFAULT_TERM_COUNT_CUTOFF;
    private double docCountPercent = DEFAULT_DOC_COUNT_PERCENT;
    
    public void setTermCountCutoff(int count)
    {
      termCountCutoff = count;
    }
    
    public int getTermCountCutoff()
    {
      return termCountCutoff;
    }
    
    public void setDocCountPercent(double percent)
    {
      docCountPercent = percent;
    }
    
    public double getDocCountPercent()
    {
      return docCountPercent;
    }
    
    /* Error */
    public Query rewrite(IndexReader reader, MultiTermQuery query)
      throws IOException
    {
      // Byte code:
      //   0: new 6	java/util/ArrayList
      //   3: dup
      //   4: invokespecial 7	java/util/ArrayList:<init>	()V
      //   7: astore_3
      //   8: aload_0
      //   9: getfield 5	org/apache/lucene/search/MultiTermQuery$ConstantScoreAutoRewrite:docCountPercent	D
      //   12: ldc2_w 8
      //   15: ddiv
      //   16: aload_1
      //   17: invokevirtual 10	org/apache/lucene/index/IndexReader:maxDoc	()I
      //   20: i2d
      //   21: dmul
      //   22: d2i
      //   23: istore 4
      //   25: invokestatic 11	org/apache/lucene/search/BooleanQuery:getMaxClauseCount	()I
      //   28: aload_0
      //   29: getfield 3	org/apache/lucene/search/MultiTermQuery$ConstantScoreAutoRewrite:termCountCutoff	I
      //   32: invokestatic 12	java/lang/Math:min	(II)I
      //   35: istore 5
      //   37: iconst_0
      //   38: istore 6
      //   40: aload_2
      //   41: aload_1
      //   42: invokevirtual 13	org/apache/lucene/search/MultiTermQuery:getEnum	(Lorg/apache/lucene/index/IndexReader;)Lorg/apache/lucene/search/FilteredTermEnum;
      //   45: astore 7
      //   47: aload 7
      //   49: invokevirtual 14	org/apache/lucene/search/FilteredTermEnum:term	()Lorg/apache/lucene/index/Term;
      //   52: astore 8
      //   54: aload 8
      //   56: ifnull +23 -> 79
      //   59: aload_3
      //   60: aload 8
      //   62: invokeinterface 15 2 0
      //   67: pop
      //   68: iload 6
      //   70: aload_1
      //   71: aload 8
      //   73: invokevirtual 16	org/apache/lucene/index/IndexReader:docFreq	(Lorg/apache/lucene/index/Term;)I
      //   76: iadd
      //   77: istore 6
      //   79: aload_3
      //   80: invokeinterface 17 1 0
      //   85: iload 5
      //   87: if_icmpge +10 -> 97
      //   90: iload 6
      //   92: iload 4
      //   94: if_icmplt +39 -> 133
      //   97: new 18	org/apache/lucene/search/ConstantScoreQuery
      //   100: dup
      //   101: new 19	org/apache/lucene/search/MultiTermQueryWrapperFilter
      //   104: dup
      //   105: aload_2
      //   106: invokespecial 20	org/apache/lucene/search/MultiTermQueryWrapperFilter:<init>	(Lorg/apache/lucene/search/MultiTermQuery;)V
      //   109: invokespecial 21	org/apache/lucene/search/ConstantScoreQuery:<init>	(Lorg/apache/lucene/search/Filter;)V
      //   112: astore 9
      //   114: aload 9
      //   116: aload_2
      //   117: invokevirtual 22	org/apache/lucene/search/MultiTermQuery:getBoost	()F
      //   120: invokevirtual 23	org/apache/lucene/search/Query:setBoost	(F)V
      //   123: aload 9
      //   125: astore 10
      //   127: jsr +132 -> 259
      //   130: aload 10
      //   132: areturn
      //   133: aload 7
      //   135: invokevirtual 24	org/apache/lucene/search/FilteredTermEnum:next	()Z
      //   138: ifne +110 -> 248
      //   141: aload_3
      //   142: invokeinterface 25 1 0
      //   147: astore 9
      //   149: new 26	org/apache/lucene/search/BooleanQuery
      //   152: dup
      //   153: iconst_1
      //   154: invokespecial 27	org/apache/lucene/search/BooleanQuery:<init>	(Z)V
      //   157: astore 10
      //   159: aload 9
      //   161: invokeinterface 28 1 0
      //   166: ifeq +35 -> 201
      //   169: new 29	org/apache/lucene/search/TermQuery
      //   172: dup
      //   173: aload 9
      //   175: invokeinterface 30 1 0
      //   180: checkcast 31	org/apache/lucene/index/Term
      //   183: invokespecial 32	org/apache/lucene/search/TermQuery:<init>	(Lorg/apache/lucene/index/Term;)V
      //   186: astore 11
      //   188: aload 10
      //   190: aload 11
      //   192: getstatic 33	org/apache/lucene/search/BooleanClause$Occur:SHOULD	Lorg/apache/lucene/search/BooleanClause$Occur;
      //   195: invokevirtual 34	org/apache/lucene/search/BooleanQuery:add	(Lorg/apache/lucene/search/Query;Lorg/apache/lucene/search/BooleanClause$Occur;)V
      //   198: goto -39 -> 159
      //   201: new 18	org/apache/lucene/search/ConstantScoreQuery
      //   204: dup
      //   205: new 35	org/apache/lucene/search/QueryWrapperFilter
      //   208: dup
      //   209: aload 10
      //   211: invokespecial 36	org/apache/lucene/search/QueryWrapperFilter:<init>	(Lorg/apache/lucene/search/Query;)V
      //   214: invokespecial 21	org/apache/lucene/search/ConstantScoreQuery:<init>	(Lorg/apache/lucene/search/Filter;)V
      //   217: astore 11
      //   219: aload 11
      //   221: aload_2
      //   222: invokevirtual 22	org/apache/lucene/search/MultiTermQuery:getBoost	()F
      //   225: invokevirtual 23	org/apache/lucene/search/Query:setBoost	(F)V
      //   228: aload_2
      //   229: aload_3
      //   230: invokeinterface 17 1 0
      //   235: invokevirtual 37	org/apache/lucene/search/MultiTermQuery:incTotalNumberOfTerms	(I)V
      //   238: aload 11
      //   240: astore 12
      //   242: jsr +17 -> 259
      //   245: aload 12
      //   247: areturn
      //   248: goto -201 -> 47
      //   251: astore 13
      //   253: jsr +6 -> 259
      //   256: aload 13
      //   258: athrow
      //   259: astore 14
      //   261: aload 7
      //   263: invokevirtual 38	org/apache/lucene/search/FilteredTermEnum:close	()V
      //   266: ret 14
      // Line number table:
      //   Java source line #222	-> byte code offset #0
      //   Java source line #223	-> byte code offset #8
      //   Java source line #224	-> byte code offset #25
      //   Java source line #225	-> byte code offset #37
      //   Java source line #227	-> byte code offset #40
      //   Java source line #230	-> byte code offset #47
      //   Java source line #231	-> byte code offset #54
      //   Java source line #232	-> byte code offset #59
      //   Java source line #237	-> byte code offset #68
      //   Java source line #240	-> byte code offset #79
      //   Java source line #242	-> byte code offset #97
      //   Java source line #243	-> byte code offset #114
      //   Java source line #244	-> byte code offset #123
      //   Java source line #245	-> byte code offset #133
      //   Java source line #249	-> byte code offset #141
      //   Java source line #250	-> byte code offset #149
      //   Java source line #251	-> byte code offset #159
      //   Java source line #252	-> byte code offset #169
      //   Java source line #253	-> byte code offset #188
      //   Java source line #254	-> byte code offset #198
      //   Java source line #256	-> byte code offset #201
      //   Java source line #257	-> byte code offset #219
      //   Java source line #258	-> byte code offset #228
      //   Java source line #259	-> byte code offset #238
      //   Java source line #261	-> byte code offset #248
      //   Java source line #263	-> byte code offset #251
      // Local variable table:
      //   start	length	slot	name	signature
      //   0	268	0	this	ConstantScoreAutoRewrite
      //   0	268	1	reader	IndexReader
      //   0	268	2	query	MultiTermQuery
      //   7	223	3	pendingTerms	java.util.Collection
      //   23	70	4	docCountCutoff	int
      //   35	51	5	termCountLimit	int
      //   38	53	6	docVisitCount	int
      //   45	217	7	enumerator	FilteredTermEnum
      //   52	20	8	t	Term
      //   112	12	9	result	Query
      //   147	27	9	it	java.util.Iterator
      //   125	6	10	localQuery1	Query
      //   157	53	10	bq	BooleanQuery
      //   186	5	11	tq	TermQuery
      //   217	22	11	result	Query
      //   240	6	12	localQuery2	Query
      //   251	6	13	localObject1	Object
      //   259	1	14	localObject2	Object
      // Exception table:
      //   from	to	target	type
      //   47	130	251	finally
      //   133	245	251	finally
      //   248	256	251	finally
    }
    
    public int hashCode()
    {
      int prime = 1279;
      return (int)(1279 * termCountCutoff + Double.doubleToLongBits(docCountPercent));
    }
    
    public boolean equals(Object obj)
    {
      if (this == obj) {
        return true;
      }
      if (obj == null) {
        return false;
      }
      if (getClass() != obj.getClass()) {
        return false;
      }
      ConstantScoreAutoRewrite other = (ConstantScoreAutoRewrite)obj;
      if (termCountCutoff != termCountCutoff) {
        return false;
      }
      if (Double.doubleToLongBits(docCountPercent) != Double.doubleToLongBits(docCountPercent)) {
        return false;
      }
      return true;
    }
  }
  
  public static final RewriteMethod CONSTANT_SCORE_AUTO_REWRITE_DEFAULT = new ConstantScoreAutoRewrite()
  {
    public void setTermCountCutoff(int count)
    {
      throw new UnsupportedOperationException("Please create a private instance");
    }
    
    public void setDocCountPercent(double percent)
    {
      throw new UnsupportedOperationException("Please create a private instance");
    }
    
    protected Object readResolve()
    {
      return MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
    }
  };
  
  /**
   * @deprecated
   */
  public MultiTermQuery(Term term)
  {
    this.term = term;
  }
  
  public MultiTermQuery() {}
  
  /**
   * @deprecated
   */
  public Term getTerm()
  {
    return term;
  }
  
  protected abstract FilteredTermEnum getEnum(IndexReader paramIndexReader)
    throws IOException;
  
  public int getTotalNumberOfTerms()
  {
    return numberOfTerms;
  }
  
  public void clearTotalNumberOfTerms()
  {
    numberOfTerms = 0;
  }
  
  protected void incTotalNumberOfTerms(int inc)
  {
    numberOfTerms += inc;
  }
  
  public Query rewrite(IndexReader reader)
    throws IOException
  {
    return rewriteMethod.rewrite(reader, this);
  }
  
  public String toString(String field)
  {
    StringBuffer buffer = new StringBuffer();
    if (term != null)
    {
      if (!term.field().equals(field))
      {
        buffer.append(term.field());
        buffer.append(":");
      }
      buffer.append(term.text());
    }
    else
    {
      buffer.append("termPattern:unknown");
    }
    buffer.append(ToStringUtils.boost(getBoost()));
    return buffer.toString();
  }
  
  public RewriteMethod getRewriteMethod()
  {
    return rewriteMethod;
  }
  
  public void setRewriteMethod(RewriteMethod method)
  {
    rewriteMethod = method;
  }
  
  public int hashCode()
  {
    int prime = 31;
    int result = 1;
    result = 31 * result + Float.floatToIntBits(getBoost());
    result = 31 * result;
    result += rewriteMethod.hashCode();
    return result;
  }
  
  public boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (getClass() != obj.getClass()) {
      return false;
    }
    MultiTermQuery other = (MultiTermQuery)obj;
    if (Float.floatToIntBits(getBoost()) != Float.floatToIntBits(other.getBoost())) {
      return false;
    }
    if (!rewriteMethod.equals(rewriteMethod)) {
      return false;
    }
    return true;
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.MultiTermQuery
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.util.BitSet;

class MultiTermQueryWrapperFilter$1
  extends MultiTermQueryWrapperFilter.TermGenerator
{
  private final MultiTermQueryWrapperFilter this$0;
  
  MultiTermQueryWrapperFilter$1(MultiTermQueryWrapperFilter paramMultiTermQueryWrapperFilter, BitSet paramBitSet)
  {
    super(paramMultiTermQueryWrapperFilter);
  }
  
  public void handleDoc(int doc)
  {
    val$bitSet.set(doc);
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.MultiTermQueryWrapperFilter.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import org.apache.lucene.util.OpenBitSet;

class MultiTermQueryWrapperFilter$2
  extends MultiTermQueryWrapperFilter.TermGenerator
{
  private final MultiTermQueryWrapperFilter this$0;
  
  MultiTermQueryWrapperFilter$2(MultiTermQueryWrapperFilter paramMultiTermQueryWrapperFilter, OpenBitSet paramOpenBitSet)
  {
    super(paramMultiTermQueryWrapperFilter);
  }
  
  public void handleDoc(int doc)
  {
    val$bitSet.set(doc);
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.MultiTermQueryWrapperFilter.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.io.IOException;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermDocs;
import org.apache.lucene.index.TermEnum;

abstract class MultiTermQueryWrapperFilter$TermGenerator
{
  private final MultiTermQueryWrapperFilter this$0;
  
  MultiTermQueryWrapperFilter$TermGenerator(MultiTermQueryWrapperFilter paramMultiTermQueryWrapperFilter) {}
  
  public void generate(IndexReader reader, TermEnum enumerator)
    throws IOException
  {
    int[] docs = new int[32];
    int[] freqs = new int[32];
    TermDocs termDocs = reader.termDocs();
    try
    {
      int termCount = 0;
      do
      {
        Term term = enumerator.term();
        if (term == null) {
          break;
        }
        termCount++;
        termDocs.seek(term);
        for (;;)
        {
          int count = termDocs.read(docs, freqs);
          if (count == 0) {
            break;
          }
          for (int i = 0; i < count; i++) {
            handleDoc(docs[i]);
          }
        }
      } while (enumerator.next());
      this$0.query.incTotalNumberOfTerms(termCount);
    }
    finally
    {
      termDocs.close();
    }
  }
  
  public abstract void handleDoc(int paramInt);
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.MultiTermQueryWrapperFilter.TermGenerator
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.io.IOException;
import java.util.BitSet;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermDocs;
import org.apache.lucene.index.TermEnum;
import org.apache.lucene.util.OpenBitSet;

public class MultiTermQueryWrapperFilter
  extends Filter
{
  protected final MultiTermQuery query;
  
  protected MultiTermQueryWrapperFilter(MultiTermQuery query)
  {
    this.query = query;
  }
  
  public String toString()
  {
    return query.toString();
  }
  
  public final boolean equals(Object o)
  {
    if (o == this) {
      return true;
    }
    if (o == null) {
      return false;
    }
    if (getClass().equals(o.getClass())) {
      return query.equals(query);
    }
    return false;
  }
  
  public final int hashCode()
  {
    return query.hashCode();
  }
  
  public int getTotalNumberOfTerms()
  {
    return query.getTotalNumberOfTerms();
  }
  
  public void clearTotalNumberOfTerms()
  {
    query.clearTotalNumberOfTerms();
  }
  
  abstract class TermGenerator
  {
    TermGenerator() {}
    
    public void generate(IndexReader reader, TermEnum enumerator)
      throws IOException
    {
      int[] docs = new int[32];
      int[] freqs = new int[32];
      TermDocs termDocs = reader.termDocs();
      try
      {
        int termCount = 0;
        do
        {
          Term term = enumerator.term();
          if (term == null) {
            break;
          }
          termCount++;
          termDocs.seek(term);
          for (;;)
          {
            int count = termDocs.read(docs, freqs);
            if (count == 0) {
              break;
            }
            for (int i = 0; i < count; i++) {
              handleDoc(docs[i]);
            }
          }
        } while (enumerator.next());
        query.incTotalNumberOfTerms(termCount);
      }
      finally
      {
        termDocs.close();
      }
    }
    
    public abstract void handleDoc(int paramInt);
  }
  
  /**
   * @deprecated
   */
  public BitSet bits(IndexReader reader)
    throws IOException
  {
    TermEnum enumerator = query.getEnum(reader);
    try
    {
      final BitSet bitSet = new BitSet(reader.maxDoc());
      new TermGenerator(bitSet)
      {
        public void handleDoc(int doc)
        {
          bitSet.set(doc);
        }
      }.generate(reader, enumerator);
      
      return bitSet;
    }
    finally
    {
      enumerator.close();
    }
  }
  
  public DocIdSet getDocIdSet(IndexReader reader)
    throws IOException
  {
    TermEnum enumerator = query.getEnum(reader);
    try
    {
      if (enumerator.term() == null) {
        return DocIdSet.EMPTY_DOCIDSET;
      }
      final OpenBitSet bitSet = new OpenBitSet(reader.maxDoc());
      new TermGenerator(bitSet)
      {
        public void handleDoc(int doc)
        {
          bitSet.set(doc);
        }
      }.generate(reader, enumerator);
      
      return bitSet;
    }
    finally
    {
      enumerator.close();
    }
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.MultiTermQueryWrapperFilter
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

public final class NumericRangeFilter
  extends MultiTermQueryWrapperFilter
{
  private NumericRangeFilter(NumericRangeQuery query)
  {
    super(query);
  }
  
  public static NumericRangeFilter newLongRange(String field, int precisionStep, Long min, Long max, boolean minInclusive, boolean maxInclusive)
  {
    return new NumericRangeFilter(NumericRangeQuery.newLongRange(field, precisionStep, min, max, minInclusive, maxInclusive));
  }
  
  public static NumericRangeFilter newLongRange(String field, Long min, Long max, boolean minInclusive, boolean maxInclusive)
  {
    return new NumericRangeFilter(NumericRangeQuery.newLongRange(field, min, max, minInclusive, maxInclusive));
  }
  
  public static NumericRangeFilter newIntRange(String field, int precisionStep, Integer min, Integer max, boolean minInclusive, boolean maxInclusive)
  {
    return new NumericRangeFilter(NumericRangeQuery.newIntRange(field, precisionStep, min, max, minInclusive, maxInclusive));
  }
  
  public static NumericRangeFilter newIntRange(String field, Integer min, Integer max, boolean minInclusive, boolean maxInclusive)
  {
    return new NumericRangeFilter(NumericRangeQuery.newIntRange(field, min, max, minInclusive, maxInclusive));
  }
  
  public static NumericRangeFilter newDoubleRange(String field, int precisionStep, Double min, Double max, boolean minInclusive, boolean maxInclusive)
  {
    return new NumericRangeFilter(NumericRangeQuery.newDoubleRange(field, precisionStep, min, max, minInclusive, maxInclusive));
  }
  
  public static NumericRangeFilter newDoubleRange(String field, Double min, Double max, boolean minInclusive, boolean maxInclusive)
  {
    return new NumericRangeFilter(NumericRangeQuery.newDoubleRange(field, min, max, minInclusive, maxInclusive));
  }
  
  public static NumericRangeFilter newFloatRange(String field, int precisionStep, Float min, Float max, boolean minInclusive, boolean maxInclusive)
  {
    return new NumericRangeFilter(NumericRangeQuery.newFloatRange(field, precisionStep, min, max, minInclusive, maxInclusive));
  }
  
  public static NumericRangeFilter newFloatRange(String field, Float min, Float max, boolean minInclusive, boolean maxInclusive)
  {
    return new NumericRangeFilter(NumericRangeQuery.newFloatRange(field, min, max, minInclusive, maxInclusive));
  }
  
  public String getField()
  {
    return ((NumericRangeQuery)query).getField();
  }
  
  public boolean includesMin()
  {
    return ((NumericRangeQuery)query).includesMin();
  }
  
  public boolean includesMax()
  {
    return ((NumericRangeQuery)query).includesMax();
  }
  
  public Number getMin()
  {
    return ((NumericRangeQuery)query).getMin();
  }
  
  public Number getMax()
  {
    return ((NumericRangeQuery)query).getMax();
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.NumericRangeFilter
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.util.LinkedList;
import org.apache.lucene.util.NumericUtils.LongRangeBuilder;

class NumericRangeQuery$NumericRangeTermEnum$1
  extends NumericUtils.LongRangeBuilder
{
  private final NumericRangeQuery.NumericRangeTermEnum this$1;
  
  NumericRangeQuery$NumericRangeTermEnum$1(NumericRangeQuery.NumericRangeTermEnum paramNumericRangeTermEnum, NumericRangeQuery paramNumericRangeQuery) {}
  
  public final void addRange(String minPrefixCoded, String maxPrefixCoded)
  {
    NumericRangeQuery.NumericRangeTermEnum.access$000(this$1).add(minPrefixCoded);
    NumericRangeQuery.NumericRangeTermEnum.access$000(this$1).add(maxPrefixCoded);
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.NumericRangeQuery.NumericRangeTermEnum.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.util.LinkedList;
import org.apache.lucene.util.NumericUtils.IntRangeBuilder;

class NumericRangeQuery$NumericRangeTermEnum$2
  extends NumericUtils.IntRangeBuilder
{
  private final NumericRangeQuery.NumericRangeTermEnum this$1;
  
  NumericRangeQuery$NumericRangeTermEnum$2(NumericRangeQuery.NumericRangeTermEnum paramNumericRangeTermEnum, NumericRangeQuery paramNumericRangeQuery) {}
  
  public final void addRange(String minPrefixCoded, String maxPrefixCoded)
  {
    NumericRangeQuery.NumericRangeTermEnum.access$000(this$1).add(minPrefixCoded);
    NumericRangeQuery.NumericRangeTermEnum.access$000(this$1).add(maxPrefixCoded);
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.search.NumericRangeQuery.NumericRangeTermEnum.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.search;

import java.io.IOException;
import java.util.LinkedList;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermEnum;
import org.apache.lucene.util.NumericUtils.IntRangeBuilder;
import org.apache.lucene.util.NumericUtils.LongRangeBuilder;

final class NumericRangeQuery$NumericRangeTermEnum
  extends FilteredTermEnum
{
  private final IndexReader reader;
  private final LinkedList rangeBounds;
  private String currentUpperBound;
  private final NumericRangeQuery this$0;
  
  /* Error */
  NumericRangeQuery$NumericRangeTermEnum(NumericRangeQuery arg1, IndexReader reader)
    throws IOException
  {
    // Byte code:
    //   0: aload_0
    //   1: aload_1
    //   2: putfield 2	org/apache/lucene/search/NumericRangeQuery$NumericRangeTermEnum:this$0	Lorg/apache/lucene/search/NumericRangeQuery;
    //   5: aload_0
    //   6: invokespecial 3	org/apache/lucene/search/FilteredTermEnum:<init>	()V
    //   9: aload_0
    //   10: new 4	java/util/LinkedList
    //   13: dup
    //   14: invokespecial 5	java/util/LinkedList:<init>	()V
    //   17: putfield 1	org/apache/lucene/search/NumericRangeQuery$NumericRangeTermEnum:rangeBounds	Ljava/util/LinkedList;
    //   20: aload_0
    //   21: aconst_null
    //   22: putfield 6	org/apache/lucene/search/NumericRangeQuery$NumericRangeTermEnum:currentUpperBound	Ljava/lang/String;
    //   25: aload_0
    //   26: aload_2
    //   27: putfield 7	org/apache/lucene/search/NumericRangeQuery$NumericRangeTermEnum:reader	Lorg/apache/lucene/index/IndexReader;
    //   30: aload_1
    //   31: getfield 8	org/apache/lucene/search/NumericRangeQuery:valSize	I
    //   34: lookupswitch	default:+372->406, 32:+204->238, 64:+26->60
    //   60: ldc2_w 9
    //   63: lstore_3
    //   64: aload_1
    //   65: getfield 11	org/apache/lucene/search/NumericRangeQuery:min	Ljava/lang/Number;
    //   68: instanceof 12
    //   71: ifeq +14 -> 85
    //   74: aload_1
    //   75: getfield 11	org/apache/lucene/search/NumericRangeQuery:min	Ljava/lang/Number;
    //   78: invokevirtual 13	java/lang/Number:longValue	()J
    //   81: lstore_3
    //   82: goto +24 -> 106
    //   85: aload_1
    //   86: getfield 11	org/apache/lucene/search/NumericRangeQuery:min	Ljava/lang/Number;
    //   89: instanceof 14
    //   92: ifeq +14 -> 106
    //   95: aload_1
    //   96: getfield 11	org/apache/lucene/search/NumericRangeQuery:min	Ljava/lang/Number;
    //   99: invokevirtual 15	java/lang/Number:doubleValue	()D
    //   102: invokestatic 16	org/apache/lucene/util/NumericUtils:doubleToSortableLong	(D)J
    //   105: lstore_3
    //   106: aload_1
    //   107: getfield 17	org/apache/lucene/search/NumericRangeQuery:minInclusive	Z
    //   110: ifne +25 -> 135
    //   113: aload_1
    //   114: getfield 11	org/apache/lucene/search/NumericRangeQuery:min	Ljava/lang/Number;
    //   117: ifnull +18 -> 135
    //   120: lload_3
    //   121: ldc2_w 18
    //   124: lcmp
    //   125: ifne +6 -> 131
    //   128: goto +288 -> 416
    //   131: lload_3
    //   132: lconst_1
    //   133: ladd
    //   134: lstore_3
    //   135: ldc2_w 18
    //   138: lstore 5
    //   140: aload_1
    //   141: getfield 20	org/apache/lucene/search/NumericRangeQuery:max	Ljava/lang/Number;
    //   144: instanceof 12
    //   147: ifeq +15 -> 162
    //   150: aload_1
    //   151: getfield 20	org/apache/lucene/search/NumericRangeQuery:max	Ljava/lang/Number;
    //   154: invokevirtual 13	java/lang/Number:longValue	()J
    //   157: lstore 5
    //   159: goto +25 -> 184
    //   162: aload_1
    //   163: getfield 20	org/apache/lucene/search/NumericRangeQuery:max	Ljava/lang/Number;
    //   166: instanceof 14
    //   169: ifeq +15 -> 184
    //   172: aload_1
    //   173: getfield 20	org/apache/lucene/search/NumericRangeQuery:max	Ljava/lang/Number;
    //   176: invokevirtual 15	java/lang/Number:doubleValue	()D
    //   179: invokestatic 16	org/apache/lucene/util/NumericUtils:doubleToSortableLong	(D)J
    //   182: lstore 5
    //   184: aload_1
    //   185: getfield 21	org/apache/lucene/search/NumericRangeQuery:maxInclusive	Z
    //   188: ifne +28 -> 216
    //   191: aload_1
    //   192: getfield 20	org/apache/lucene/search/NumericRangeQuery:max	Ljava/lang/Number;
    //   195: ifnull +21 -> 216
    //   198: lload 5
    //   200: ldc2_w 9
    //   203: lcmp
    //   204: ifne +6 -> 210
    //   207: goto +209 -> 416
    //   210: lload 5
    //   212: lconst_1
    //   213: lsub
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd