Hi, I would really appreciate a little hint here. When I run Xapian::Query((Xpublish_date1130194800 AND XAPPSyes))' it's fine (gives me 6 documents published that day) But when I try something like Xapian::Query((Xpublish_date1130* AND XAPPSyes))' leaving aside that timestamps are not very useful here (todo), I get 0 results. Is this not the way to restrict by a date range ? Cheers Marek
richard@lemurconsulting.com
2006-Dec-05 15:39 UTC
[Xapian-discuss] Wildcards in a boolean query
On Tue, Dec 05, 2006 at 03:18:19PM +0000, Marek Tichy wrote:> But when I try something like > > Xapian::Query((Xpublish_date1130* AND XAPPSyes))' > > leaving aside that timestamps are not very useful here (todo), I get 0 > results.Wildcards are only interpreted by the query parser: if you're creating Query objects with the wildcard terms, you're causing Xapian to look for terms which are literally "Xpublish_date1130*", not expanding the wildcard. Also, remember to set the database in use before using the query parser, so that the wildcards can be expanded.> Is this not the way to restrict by a date range ?It's not the best way, since it will result in a very large number of terms being generated. Ways of grouping terms together to represent a range of dates have been discussed in the list in the past. (And Omega uses one particular method of doing this.) -- Richard