GetScoresDocsOutOfOrder() private method

private GetScoresDocsOutOfOrder ( ) : bool
return bool
Example #1
0
        // inherit javadoc
        public override TopDocs Search(Weight weight, Filter filter, int nDocs, IState state)
        {
            if (nDocs <= 0)
            {
                throw new System.ArgumentException("nDocs must be > 0");
            }
            nDocs = Math.Min(nDocs, reader.MaxDoc);

            TopScoreDocCollector collector = TopScoreDocCollector.Create(nDocs, !weight.GetScoresDocsOutOfOrder());

            Search(weight, filter, collector, state);
            return(collector.TopDocs());
        }
Example #2
0
        /// <summary> Just like <see cref="Search(Weight, Filter, int, Sort)" />, but you choose
        /// whether or not the fields in the returned <see cref="FieldDoc" /> instances
        /// should be set by specifying fillFields.
        /// <p/>
        /// NOTE: this does not compute scores by default. If you need scores, create
        /// a <see cref="TopFieldCollector" /> instance by calling
        /// <see cref="TopFieldCollector.Create" /> and then pass that to
        /// <see cref="Search(Weight, Filter, Collector)" />.
        /// <p/>
        /// </summary>
        public virtual TopFieldDocs Search(Weight weight, Filter filter, int nDocs, Sort sort, bool fillFields, IState state)
        {
            nDocs = Math.Min(nDocs, reader.MaxDoc);

            TopFieldCollector collector2 = TopFieldCollector.Create(sort, nDocs, fillFields, fieldSortDoTrackScores, fieldSortDoMaxScore, !weight.GetScoresDocsOutOfOrder());

            Search(weight, filter, collector2, state);
            return((TopFieldDocs)collector2.TopDocs());
        }
		/// <summary> Just like <see cref="Search(Weight, Filter, int, Sort)" />, but you choose
		/// whether or not the fields in the returned <see cref="FieldDoc" /> instances
		/// should be set by specifying fillFields.
		/// <p/>
		/// NOTE: this does not compute scores by default. If you need scores, create
		/// a <see cref="TopFieldCollector" /> instance by calling
		/// <see cref="TopFieldCollector.Create" /> and then pass that to
		/// <see cref="Search(Weight, Filter, Collector)" />.
		/// <p/>
		/// </summary>
		public virtual TopFieldDocs Search(Weight weight, Filter filter, int nDocs, Sort sort, bool fillFields)
		{
            nDocs = Math.Min(nDocs, reader.MaxDoc);

			TopFieldCollector collector2 = TopFieldCollector.Create(sort, nDocs, fillFields, fieldSortDoTrackScores, fieldSortDoMaxScore, !weight.GetScoresDocsOutOfOrder());
			Search(weight, filter, collector2);
			return (TopFieldDocs) collector2.TopDocs();
		}
		// inherit javadoc
		public override TopDocs Search(Weight weight, Filter filter, int nDocs)
		{
			
			if (nDocs <= 0)
			{
				throw new System.ArgumentException("nDocs must be > 0");
			}
            nDocs = Math.Min(nDocs, reader.MaxDoc);

			TopScoreDocCollector collector = TopScoreDocCollector.Create(nDocs, !weight.GetScoresDocsOutOfOrder());
			Search(weight, filter, collector);
			return collector.TopDocs();
		}