I am working on a system for indexing email, and it would be nice to be able to store multiple values for the same value_no - for instance, if an email has multiple attachments, I might want to attach a value for each attachment, but a value with the same number. One option would be store the three values as one, e.g. comma-separated, but I was just wondering how others have dealt with such a situation? /Per Jessen, Z?rich
Per Jessen wrote on 07/09/2010 10:27 AM:> I am working on a system for indexing email, and it would be nice to be > able to store multiple values for the same value_no - for instance, if > an email has multiple attachments, I might want to attach a value for > each attachment, but a value with the same number. > One option would be store the three values as one, e.g. comma-separated, > but I was just wondering how others have dealt with such a situation? >swish_xapian stores multi-value strings delimited with ASCII character \003. -- Peter Karman . http://peknet.com/ . peter at peknet.com
Peter Karman wrote:> Per Jessen wrote on 07/09/2010 10:27 AM: >> I am working on a system for indexing email, and it would be nice to >> be able to store multiple values for the same value_no - for >> instance, if an email has multiple attachments, I might want to >> attach a value for each attachment, but a value with the same number. >> One option would be store the three values as one, e.g. >> comma-separated, but I was just wondering how others have dealt with >> such a situation? >> > > swish_xapian stores multi-value strings delimited with ASCII character > \003. >Any particular reason for using \003 other than it is not 0 and highly unlikely to turn up in text? /Per Jessen, Z?rich
Per Jessen wrote on 07/09/2010 11:59 AM:> Peter Karman wrote:>> swish_xapian stores multi-value strings delimited with ASCII character >> \003. >> > > Any particular reason for using \003 other than it is not 0 and highly > unlikely to turn up in text? >for those reasons, and \003 is ETX (end of text), which seemed at the time to be the control character most like what I wanted the byte to convey. -- Peter Karman . http://peknet.com/ . peter at peknet.com