Re: Multi-faceted searches of articles

Jason <[email protected]> Sat, 12 Sep 2009 22:10:57 +0100
Newsgroups gmane.comp.cms.xaraya.devel
Organization Xaraya
Message-ID <[email protected]>
The xarpages search screen uses the leftjoin API of articles, so it can in
theory use any (or most) of the selection criteria that getall() supports. The
selection of articles here also uses getall() - the aim being to not duplicate
anything that already exists.

I think the getmonthcount() will work with a little alteration to allow
sub-queries to be injected into it. To be honest, it is something I have not
looked at yet, so may turn out to be incredibly easy to implement, thanks to the
prior work that you have put in over the years, naturally.

On the organisation, multi-faceted search is something I have been trying to get
my head around for years. I could see shops using it, and could see it was
implemented using categories (or taxonomies) like Xaraya has always had, but
just couldn't see how it all fitted together. Playing with Solr has helped me to
understand it a lot better, and this is what has popped out the end. You have no
idea how close your articles+categories module was to what Solr does and many
major websites do now (wrt multi-faceted searches) years before anyone else was
doing it. I think the only think it needed was MySQL 5 with its ability to do
sub-queries (i.e. WHERE x IN (SELECT ...).

-- Jason


mikespub wrote:
> Jason wrote:
>> Expanding this to include searches on date ranges would also be good.
>> The counts
>>  would need to be done in various contexts for this to work, e.g.
>> counts for
>> entire years when searching without a date range specified, counts for
>> each
>> month when a year is specified, counts for the day and/or week when
>> the month is
>> selected etc.
>> ...
>> -- Jason
> 
> The articles module already has an API function that lets you count the
> articles per month & optional categories : getmonthcount(). The getall()
> API function also lets you select articles by pubtype, category, month etc.
> 
> Maybe you could have a look at the SQL statements generated there for
> inspiration on how to adapt those of multi-faceted xarpages ?
> 
> Mike.
> P.S.: nice organization of that site, btw :-)