1 Jul 2007 11:15
9095: trunk/xapian-core/ trunk/xapian-core/matcher/ trunk/xapian-core/tests/
richard <xapian-commits <at> lists.xapian.org>
2007-07-01 09:15:37 GMT
2007-07-01 09:15:37 GMT
SVN root: svn://svn.xapian.org/xapian Changes by: richard Revision: 9095 Date: 2007-07-01 10:15:35 +0100 (Sun, 01 Jul 2007) Log message (16 lines): matcher/localmatch.cc: When registering a term, check if it's empty, and if so use the document count as the term frequency, rather than calling the database to get the term frequency of an empty term (most database backends have an assertion that the term is not empty, and an empty term isn't a valid parameter to pass to get_termfreq() anyway). matcher/multimatch.cc: For MatchAll queries, the "" term will not be found in the termlist of the top document, so check if a "" term is present in the query, and use it to increase the percent_scale if so. This fixes an Assertion which checked that percent_scale was not 0. tests/api_db.cc: Add test_matchall1() which tests running a query with a MatchAll query. tests/api_nodb.cc: Rename test_emptyquery1 and test_emptyquery2 to test_emptyquery2 and test_emptyquery3, respectively. There was already a (different) test_emptyquery1 in api_anydb.cc. Modified files: U trunk/xapian-core/ChangeLog U trunk/xapian-core/matcher/localmatch.cc U trunk/xapian-core/matcher/multimatch.cc U trunk/xapian-core/tests/api_db.cc U trunk/xapian-core/tests/api_nodb.cc(Continue reading)
RSS Feed