C# Class Autocomplete.Core.SearchAutoComplete

Search term auto-completer, works for single terms (so use on the last term of the query). Returns more popular terms first.
http://stackoverflow.com/questions/120180/how-to-do-query-auto-completion-suggestions-in-lucene
Afficher le fichier Open project: LateRoomsGroup/Autocomplete

Méthodes publiques

Méthode Description
BuildAutoCompleteIndex ( ) : void

Open the index in the given directory and create a new index of word frequency for the given index.

SearchAutoComplete ( int maxResults = 8 ) : System
SuggestTermsFor ( string term ) : IEnumerable

Find terms matching the given partial word that appear in the highest number of documents.

Private Methods

Méthode Description
MakeDocument ( Hotel hotel, int searchCount ) : Lucene.Net.Documents.Document
ReplaceSearcher ( ) : void

Method Details

BuildAutoCompleteIndex() public méthode

Open the index in the given directory and create a new index of word frequency for the given index.
public BuildAutoCompleteIndex ( ) : void
Résultat void

SearchAutoComplete() public méthode

public SearchAutoComplete ( int maxResults = 8 ) : System
maxResults int
Résultat System

SuggestTermsFor() public méthode

Find terms matching the given partial word that appear in the highest number of documents.
public SuggestTermsFor ( string term ) : IEnumerable
term string A word or part of a word
Résultat IEnumerable