Hello Xapianistas , I am writing an email search tool in Perl and would like users to be able to search for messages by date . I decided that i when indexing i would catch dates and convert them to seconds since epoch(SSE) and give them a prefix and weight. By then interpreting the incoming queries in to SSE I hope to use the range operator to allow for date ranges. Before i then start dealing with the clusterf**k that is date manipulation it occured to me that this must be quite a common thing to do. I couldn't find it in mentioned in the docs , or on the list so i thought i'd see how you lot have done it . Have i missed something built-in that does this ? Has anyone done this before ? how did it go ? Is SSE the right way to go for dates in Xapian ? Any comments or assistance on this would be much appreciated. Thanks in advance. Toodle-pip Amias
Amias Channer wrote:>Hello Xapianistas , > >I am writing an email search tool in Perl and would like users to be >able to search for messages by date . > >I decided that i when indexing i would catch dates and convert them to >seconds since epoch(SSE) and give them a prefix and weight. By then >interpreting the incoming queries in to SSE I hope to use the range >operator to allow for date ranges. > >Before i then start dealing with the clusterf**k that is date >manipulation it occured to me that this must be quite a common >thing to do. I couldn't find it in mentioned in the docs , or >on the list so i thought i'd see how you lot have done it . > >Have i missed something built-in that does this ? >Has anyone done this before ? how did it go ? >Is SSE the right way to go for dates in Xapian ? > >Any comments or assistance on this would be much appreciated. >Thanks in advance. > >Toodle-pip >Amias > > >_______________________________________________ >Xapian-discuss mailing list >Xapian-discuss at lists.xapian.org >http://lists.xapian.org/mailman/listinfo/xapian-discuss > > > >One method is discussed here: http://lists.tartarus.org/pipermail/xapian-discuss/2007-June/003894.html Jim
On Sat, Nov 08, 2008 at 11:47:41AM +0000, Amias Channer wrote:> Have i missed something built-in that does this ? > Has anyone done this before ? how did it go ? > Is SSE the right way to go for dates in Xapian ?http://xapian.org/docs/valueranges.html#datevaluerangeprocessor I use YYYYMMDD as suggested, works perfectly. ATB, Matthew