List Info

Thread: Lists of keywords




Lists of keywords
user name
2008-04-18 10:21:57
Hello all,

We use keywords as "tags" on one of our sites 
(http://www.quep
asacontent.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, bond. EC1R 0JH
t 020 7183 1410 f 020 7099 5140 m 07951 758698
w http://www.digitalcr
aftsmen.net/

Re: Lists of keywords
user name
2008-04-18 10:39:13
On Apr 18, 2008, at 08:21, Simon Wilcox wrote:

> We use keywords as "tags" on one of our sites
(http://www.quep
asacontent.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

Re: Lists of keywords
user name
2008-04-18 14:20:41
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.quep
asacontent.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, bond. EC1R 0JH
t 020 7183 1410 f 020 7099 5140 m 07951 758698
w http://www.digitalcr
aftsmen.net/

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )