[Xapian-discuss] Counting and statistics

Richard Boulton richard at lemurconsulting.com
Fri Mar 30 09:57:27 BST 2007


Olly Betts wrote:
> On Thu, Mar 29, 2007 at 09:31:04AM +0200, Andreas Marienborg wrote:
>> Well, I am not adding everything form the database, just everything  
>> from the last month (or whatever I choose to look at)
> 
> Sorry, I misunderstood what you were saying.
> 
>>> You can call Database::get_collectionfreq() and  
>>> Database::get_termfreq()
>>> with the termname to find these out.  They aren't stored in the ESet
>>> though.
>> But will theese work on a set, or the complete database?
> 
> The complete database.
> 
>> I want to know how many times a term occured within a given
>> searchresult.
> 
> We know internally how many documents in the RSet are indexed by each
> term in the ESet (is that what you're after?), but that's not currently
> made available via the API.  I think it would be useful though - I'll
> take a look.

Yes - it would also be nice to be able get this information without 
having to do an expand: ie, to call RSet::get_collectionfreq(term) and 
RSet::get_termfreq(term), if something like that is possible to 
implement.  The implementation would have to do essentially the same 
work as is done when doing an expand, of course.

-- 
Richard



More information about the Xapian-discuss mailing list