lucene.net - Lucene sorting in (keyword, alphabetical) order -


how sort search results in following order (query phrase, alphabetical). give example, if have documents in index, each 1 field (foodname). food names of documents are

  1. fat chicken
  2. chicken breast
  3. chicken lasagna

if query search word "chicken", results in following order

  1. chicken breast
  2. chicken lasagna
  3. fat chicken

please note boosting factor these documents same in indexing stage. appreciated

thanks -venu

i'll give high level overview of i'd do. consider using food ingredients / recipes types dictionary & assigning higher boosting words in index matches items in food dictionary. , perhaps go further, assign weights keywords in food dictionary. here's example of food ingredients dictionary.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -