Ejemplo n.º 1
0
 /// <summary>
 /// take by paging data
 /// </summary>
 /// <param name="hits"></param>
 /// <param name="searcher"></param>
 /// <param name="paging"></param>
 /// <returns></returns>
 private static IEnumerable <int> MapLuceneToDataList(IEnumerable <ScoreDoc> hits, IndexSearcher searcher,
                                                      IndexPaging paging)
 {
     return
         (hits.Skip(paging.StartPos).Take(paging.EndPos - paging.StartPos).Select(
              hit => MapLuceneDocumentToData(searcher.Doc(hit.doc))).ToList());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// take by paging data
 /// </summary>
 /// <param name="hits"></param>
 /// <param name="searcher"></param>
 /// <param name="paging"></param>
 /// <returns></returns>
 private static IEnumerable<int> MapLuceneToDataList(IEnumerable<ScoreDoc> hits, IndexSearcher searcher,
     IndexPaging paging)
 {
     return
         hits.Skip(paging.StartPos).Take(paging.EndPos - paging.StartPos).Select(
             hit => MapLuceneDocumentToData(searcher.Doc(hit.doc))).ToList();
 }