views:

291

answers:

1

How-to build AutoComplete / Suggestions with Lucene.NET ?

A: 

create a database of all search queries coming into your application. (query log)

create a table that has similar fields

QueryText varchar(x)
Occurence int

then do a search where the query text starts with what the user is searching for and order by the occurrence descending.

where QueryText LIKE 'some text%' ORDER BY Occurence DESC
Andrew Smith