[Xapian-discuss] Unique Term Listings

Joachim Martin jmartin at path-works.com
Wed Nov 15 16:24:11 GMT 2006


[Sorry if this offends anyone]

Solr (http://incubator.apache.org/solr/) does this out of the box.  Solr 
uses Lucene under the covers, so it
may not work for your situation.

Solr's "faceted searching" is exactly what you describe.  It works very 
well, but is pretty slow if the database is large,
and the field has multiple values (as might be the case for Category).

A version of this is what you see on cnet.com when you search for products.

Don't want to start a war here- I think xapian is a great project, 
especially if speed is important (which it always is ;-). 
This is a great feature though, if xapian could do this well it would be 
a huge win.

--Joachim


Martin Hearn wrote:

> Hi Olly
>
> I'm trying to achieve something similar to what ebay does.
> E.g. If I search for "harry potter" on ebay I get a list of over 50  
> categories with the number of entries for each category.
>
> Because the number of categories is potentially large I don't want to  
> have to query each one.
> If I understand correctly I would still have to query each category  
> with get_eset?
>
> I hope this makes sense. Thanks for your help.
>
> Cheers
> Martin
>
>
> On 14 Nov 2006, at 05:39, Olly Betts wrote:
>
>> On Tue, Nov 07, 2006 at 08:25:42PM +0000, Martin Hearn wrote:
>>
>>> Many thanks for your assistance. The only trouble with the way you
>>> suggest is that you have to know what terms to search for.
>>> If I wanted to group all my results by date tag, I'd have to run the
>>> OP_FILTER 365 times for a year, which is not efficient.
>>
>>
>> Yes, that wouldn't work so well.
>>
>> What are you actually trying to achieve here?  If you want some  sort of
>> dynamic grouping of results, you could use query expansion (put the
>> first N matching documents in a Xapian::RSet, and call
>> Enquire::get_eset() with an ExpandDecider which picks suitably  prefixed
>> boolean terms).
>>
>> Cheers,
>>     Olly
>
>
>
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss





More information about the Xapian-discuss mailing list