Closed da115115 closed 10 years ago
When 3-letter/4-letter codes are entered, and they those match with a IATA, ICAO or FAA code, the corresponding POR entries should be selected. One way to do that is to set the final matching weight (after application of PageRank) to 100%.
Though working quite nicely, there are still some imperfections, some of which may be simply fixed. More specifically, the http://search-travel.org/search/?q=sez+airport request yields "Mahé (SEZ) -- Vadsø Airport (VDS)", due to the fact that {'sez', 'airport'} better matches than {'sez airport'}, as 'sez' now matches with 100% and 'airport' matches with 2.45%. Several options in order to improve the algorithm:
When indexing a term, the weight may be specified; see the documentation of Xapian::TermGenerator::index_text() function for more details. By default, a weight of 1 is applied. For IATA/ICAO/FAA codes, a weight of 2 may be applied. Note that, for now, the Place source code implements the indexation in a generic way through a generic list of terms stored in Place. We could therefore have a map of list of terms: the key would be the weight and the value would be the list of terms:
typdef <const Weight_T, StringSet_T> TermSetMap_T;
TermSetMap_T _termSetMap;
Then, in the Xapian indexing code, the terms would be indexed according to their weight.
Implemented as for the issue #5 (Indexing travel types with PageRank weights).
When seaching for KHI, the city of Jakarta, Indonesia (ID), is returned, whereas KHI is the code of Karachi, Pakistan (PK).
The cause is that: