コード例 #1
0
ファイル: FilteredQuery.cs プロジェクト: ferrod20/tprilucene
        /// <summary> Returns a Weight that applies the filter to the enclosed query's Weight.
        /// This is accomplished by overriding the Scorer returned by the Weight.
        /// </summary>
        protected internal override Weight CreateWeight(Searcher searcher)
        {
            Weight     weight     = query.CreateWeight(searcher);
            Similarity similarity = query.GetSimilarity(searcher);

            return(new AnonymousClassWeight(weight, similarity, this));
        }
コード例 #2
0
ファイル: FilteredQuery.cs プロジェクト: ravendb/lucenenet
        /// <summary> Returns a Weight that applies the filter to the enclosed query's Weight.
        /// This is accomplished by overriding the Scorer returned by the Weight.
        /// </summary>
        public override Weight CreateWeight(Searcher searcher, IState state)
        {
            Weight     weight     = query.CreateWeight(searcher, state);
            Similarity similarity = query.GetSimilarity(searcher);

            return(new AnonymousClassWeight(weight, similarity, this));
        }