[Xapian-discuss] How to search URL field (unique Q key)?

oscaruser at programmer.net oscaruser at programmer.net
Mon Jul 31 18:51:08 BST 2006


Hi James,

If I'm not mistaken, the approach of printing all of the Q terms basically dumps the database contents, but does no searching. If the URL field was set to unique, I would imagine that there is a method of searching against the key. Based on the functionality of scriptindex, it determines whether to the record already exists or not before updating or adding to the index. This latter functionality is the one I want to utilize because based on the nature of the datastructure and keys, searching should be very fast. I'll check the scriptindex sources to see if I can understand what's going on there.

Thanks,
-OSC

> ----- Original Message -----
> From: "James Aylett" <james-xapian at tartarus.org>
> To: xapian-discuss at lists.xapian.org
> Subject: Re: [Xapian-discuss] How to search URL field (unique Q key)?
> Date: Sun, 30 Jul 2006 09:57:58 +0100
> 
> 
> On Sat, Jul 29, 2006 at 10:46:46PM -0800, oscaruser at programmer.net wrote:
> 
> > I ran script index on about 1800 documents, and somewhere during the
> > scriptindex process of adding files to the flint db, I terminated
> > the program (^C).  I don't know which docs were added, from those
> > that are remaining, and wanted to know if there is a way to search
> > the db based on the URL field which was defined as "url : field=url
> > hash boolean=Q unique=Q" in the script index?
> 
> No idea if this will actually work as it's a boundary case, but how
> about omega with:
> 
> $setmap{prefix,url,Q}
> $hitlist{url = $field{url}
> }
> 
> and search it for url:*
> 
> The bit I'm uncertain about is whether wildcards will work like that
> or not. If not, write a python, php or whatever script using the
> bindings to list all terms in the database, skip_to "Q" and keep
> printing until they don't start with "Q" any more.
> 
> James
> 
> --
> /--------------------------------------------------------------------------\
>    James Aylett                                                  xapian.org
>    james at tartarus.org                               uncertaintydivision.org


-- 
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/




More information about the Xapian-discuss mailing list