lucene - Weightened City Index -
i created index of cities following properties
- name
- population
- 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
Post a Comment