Beispiel #1
0
	    public override Query Rewrite(IndexReader reader)
		{
            if (_termIsPrefix)
            {
                MultiTermQuery rewritten =
                    new PrefixQuery(internalTerm.CreateTerm(internalTerm.Text.Substring(0, internalTerm.Text.IndexOf('*'))));
                rewritten.Boost = Boost;
                rewritten.RewriteMethod = RewriteMethod;
                return rewritten;
            }
            else
            {
                return base.Rewrite(reader);
            }
		}