예제 #1
0
        /// <summary>User drills down on the specified range.</summary>
        public TopDocs DrillDown(DoubleRange range)
        {
            // Passing no baseQuery means we drill down on all
            // documents ("browse only"):
            DrillDownQuery q  = new DrillDownQuery(null);
            ValueSource    vs = GetDistanceValueSource();

            q.Add("field", range.GetFilter(GetBoundingBoxFilter(ORIGIN_LATITUDE, ORIGIN_LONGITUDE, range.Max), vs));
            DrillSideways ds = new SearchDrillSideways(searcher, config, vs);

            return(ds.Search(q, 10).Hits);
        }