C# Класс Lucene.Net.Demo.SearchFiles

Simple command-line based search demo.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DoPagingSearch ( System in_Renamed, Lucene.Net.Search.Searcher searcher, Lucene.Net.Search.Query query, int hitsPerPage, bool raw, bool interactive ) : void

This demonstrates a typical paging search scenario, where the search engine presents pages of size n to the user. The user can then go to the next page if interested in the next hits. When the query is executed for the first time, then only enough results are collected to fill 5 result pages. If the user wants to page beyond this limit, then the query is executed another time and all hits are collected.

DoStreamingSearch ( Lucene.Net.Search.Searcher searcher, Lucene.Net.Search.Query query ) : void

This method uses a custom HitCollector implementation which simply prints out the docId and score of every matching document. This simulates the streaming search use case, where all hits are supposed to be processed, regardless of their relevance.

Приватные методы

Метод Описание
Main ( System args ) : void
SearchFiles ( ) : System

Описание методов

DoPagingSearch() публичный статический Метод

This demonstrates a typical paging search scenario, where the search engine presents pages of size n to the user. The user can then go to the next page if interested in the next hits. When the query is executed for the first time, then only enough results are collected to fill 5 result pages. If the user wants to page beyond this limit, then the query is executed another time and all hits are collected.
public static DoPagingSearch ( System in_Renamed, Lucene.Net.Search.Searcher searcher, Lucene.Net.Search.Query query, int hitsPerPage, bool raw, bool interactive ) : void
in_Renamed System
searcher Lucene.Net.Search.Searcher
query Lucene.Net.Search.Query
hitsPerPage int
raw bool
interactive bool
Результат void

DoStreamingSearch() публичный статический Метод

This method uses a custom HitCollector implementation which simply prints out the docId and score of every matching document. This simulates the streaming search use case, where all hits are supposed to be processed, regardless of their relevance.
public static DoStreamingSearch ( Lucene.Net.Search.Searcher searcher, Lucene.Net.Search.Query query ) : void
searcher Lucene.Net.Search.Searcher
query Lucene.Net.Search.Query
Результат void