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
Show file Open project: LateRoomsGroup/Autocomplete

Public Methods

Method 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

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

Method Details

BuildAutoCompleteIndex() public method

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

SearchAutoComplete() public method

public SearchAutoComplete ( int maxResults = 8 ) : System
maxResults int
return System

SuggestTermsFor() public method

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
return IEnumerable