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

Olly Betts olly at survex.com
Fri Aug 25 00:16:28 BST 2006


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? Example as follows.

For 1800 documents, I'd just reindex rather than mess around.

But you can easily check if a particular term is in a database using
delve, e.g.:

    delve -t Qhttp://www.google.com/ ./db

If the URL is long (~240 characters or more) the "hash" will mean you
can't just use the URL as is to produce this term.

Or you could just check the URL for the last document successfully
added:

    delve ./db

Which will tell you how many documents there are - assuming there were
no deletions, this will be the docid of the last document added and
you can list its termlist like so:

    delve -r 1800 ./db

Cheers,
    Olly



More information about the Xapian-discuss mailing list