Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: devel

Lists of keywords

 

 

Bricolage devel RSS feed   Index | Next | Previous | View Threaded


simonw at digitalcraftsmen

Apr 18, 2008, 8:21 AM

Post #1 of 3 (222 views)
Permalink
Lists of keywords

Hello all,

We use keywords as "tags" on one of our sites
(http://www.quepasacontent.co.uk/tags/) and now we're creating a second,
similar, site within the same Bricolage instance.

We've found that there's no way to get all the keywords for a given
site, it always searches all keywords.

This is a bit sub-optimal and we'll try to fix it next week when Paul's
back in the office but in the meantime would it be faster/more efficient
to pull all the keywords and search for any stories in the current site
that use that keyword or to pull all the active stories and read the
keywords from each one to create our own list ?

Actually, reading the above it seems that the latter would be more
efficient but if someone could confirm that and also that we're not
being particularly dense with respect to the searching by site problem
I'd be most grateful.

Simon.

--
Digital Craftsmen Ltd
Exmouth House, 3 Pine Street, London. EC1R 0JH
t 020 7183 1410 f 020 7099 5140 m 07951 758698
w http://www.digitalcraftsmen.net/


david at kineticode

Apr 18, 2008, 8:39 AM

Post #2 of 3 (205 views)
Permalink
Re: Lists of keywords [In reply to]

On Apr 18, 2008, at 08:21, Simon Wilcox wrote:

> We use keywords as "tags" on one of our sites (http://www.quepasacontent.co.uk/tags/
> ) and now we're creating a second, similar, site within the same
> Bricolage instance.
>
> We've found that there's no way to get all the keywords for a given
> site, it always searches all keywords.
>
> This is a bit sub-optimal and we'll try to fix it next week when
> Paul's back in the office but in the meantime would it be faster/
> more efficient to pull all the keywords and search for any stories
> in the current site that use that keyword or to pull all the active
> stories and read the keywords from each one to create our own list ?

Neither is optimal. Best is to add a site_id parameter to Keyword-
>list. In fact, we can use that in trunk, where a new suggest feature
helps uses to put in keywords, and it should probably be site-limited.

But if you must do the above, I should think that loading all the
keywords would be more efficient, since they are very small objects
and the query to load them is quite simple. The same is not true of
the query to load stories.

> Actually, reading the above it seems that the latter would be more
> efficient but if someone could confirm that and also that we're not
> being particularly dense with respect to the searching by site
> problem I'd be most grateful.

It's not dense to search by site, but your time would be much better
spent adding a site_id parameter to Keyword->list, as I said.

Best,

David


simonw at digitalcraftsmen

Apr 18, 2008, 12:20 PM

Post #3 of 3 (203 views)
Permalink
Re: Lists of keywords [In reply to]

David E. Wheeler wrote:
> On Apr 18, 2008, at 08:21, Simon Wilcox wrote:
>
>> We use keywords as "tags" on one of our sites
>> (http://www.quepasacontent.co.uk/tags/) and now we're creating a
>> second, similar, site within the same Bricolage instance.
>>
>> We've found that there's no way to get all the keywords for a given
>> site, it always searches all keywords.
>>
>> This is a bit sub-optimal and we'll try to fix it next week when
>> Paul's back in the office but in the meantime would it be faster/more
>> efficient to pull all the keywords and search for any stories in the
>> current site that use that keyword or to pull all the active stories
>> and read the keywords from each one to create our own list ?
>
> Neither is optimal. Best is to add a site_id parameter to Keyword->list.
> In fact, we can use that in trunk, where a new suggest feature helps
> uses to put in keywords, and it should probably be site-limited.

OK. We'll do that next week.

> But if you must do the above, I should think that loading all the
> keywords would be more efficient, since they are very small objects and
> the query to load them is quite simple. The same is not true of the
> query to load stories.

As it happens, we need all the stories later in the template to iterate
over them building up lists of tags so we ended up grabbing all the stories.

>> Actually, reading the above it seems that the latter would be more
>> efficient but if someone could confirm that and also that we're not
>> being particularly dense with respect to the searching by site problem
>> I'd be most grateful.
>
> It's not dense to search by site, but your time would be much better
> spent adding a site_id parameter to Keyword->list, as I said.

Yep but Paul had the afternoon off and he's the only one with the
requisite knowledge to poke the internals. We muddled through in the
template and will fix the real issue when he's back :-)

Thanks for the help, have a great weekend.

S.

--
Digital Craftsmen Ltd
Exmouth House, 3 Pine Street, London. EC1R 0JH
t 020 7183 1410 f 020 7099 5140 m 07951 758698
w http://www.digitalcraftsmen.net/

Bricolage devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.