Given a document, how do you get its ID? (perl bindings)

Alex Aminoff aminoff at nber.org
Mon May 9 18:11:54 BST 2016


I am writing an indexer that will crawl our web site. Following the 
recommendation here:

https://trac.xapian.org/wiki/FAQ/UniqueIds

I'm using the URL as the unique ID for each document. I see how to get a 
document from the xapian database if I know its URL, but what I need is 
also to be able to find out the URL from the document. Does this mean I 
need to store the URL in a value in addition to as a term? In fact I 
notice that there is no get_id method on a document object, so even if 
you use numeric IDs assigned by Xapian you can not get them from a document.

  - Alex




More information about the Xapian-discuss mailing list