lucene - Weightened City Index -


i created index of cities following properties

  1. name
  2. population
  3. country

with following code can run searches , got results

var parser = new queryparser(lucene.net.util.version.lucene_30, "name", analyzer);  query query = parser.parse(searchterm);  topscoredoccollector result = topscoredoccollector.create(resultcount, true); searcher.search(query, result); 

for example, when run berlen~ fuzzy query got results. city berlin -with highest population- in middle. how can influence query have cities higher population value higher score?

the default order of results relevance (score). should not manipulating score change order sorting results population field.

check sorting search result in lucene based on numeric field


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -