Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.



     Discuss > WebGUI Dev

How to limit search with finer granularity that just class name?

User martink
Date 11/4/2007 10:05 am
Views 1184
Rating 20    Rate [
|
]
Previous · Next
User Message
martink
Hi,

As some of you might know, I've been trying to extend the Post/Thread
assets, and found that it's not possible to do that at the moment. I
won't go into the intricacies, as I've discussed them with a number of
(plainblack) people at the WUC. However, if there's enough interest I
will post a more detailed description of that problem here on the list.
Anyway, the problem is related to sort of a multiple inheritance problem
and the way ISA works.

I have worked around the problem by not extending Post/Thread at all but
making use of a custom macro and the userDefined fields. This works
fine, but now another problem pops up. I want to be able to search
through all of these Post/Thread assets. This wouldn't be a problem if I
could extend the assets since in that case they'd have a className
different from the regular Post/Treads. Since this is not the case I'm
going to write a custom search asset, but I'm not sure what would be the
best approach. This is what I've come up with so far:

   1) Put an identifier in one of the userDefined fields and select on
that. This would be a pretty ok. way of doing things, but requires a
join. I'm not sure what the performance impact is of doing that as the
site grows.

   2) Add an identifier to the keyword index of the asset, and add that
word to the search queries before executing the search itself. The
downside of this is that it 'pollutes' the index. On the other hand, why
should I care? People will never search on those identifiers. As far I
can see this has no performance impact.

   3) Create a seperate index for these Posts/Threads. This would seem
like a Bad Thing in terms of duplicated effort and probably almost
everything else too =). Another related option would be creating a table
containing assetIds of Post/Threads of this 'type'. That would be better
but seems like a too strong medicine too.


Since I have to include a check on another userDefined field I was
thinking of going with option 1. But nothing holds me from taking that
factor into account when I'm adding the identifier to index if I were to
use method 2.

Does anybody have comments/ideas/suggestions on this? Maybe there are
better ways of doing this, that I haven't come up with. All the
Post/Threads I'm refering too are below a custom CS (having its own
className) but I haven't found a way of exploiting that in a way that's
not extremely over convoluted.

Martin



Back to Top
Rate [
|
]
 
 
JT
>    1) Put an identifier in one of the userDefined fields and select on
> that. This would be a pretty ok. way of doing things, but requires a
> join. I'm not sure what the performance impact is of doing that as the
> site grows.

Not bad, but I hate the where clause / join hack in the getLineage  
method. And you're right, there will be a performance hit.

>
>    2) Add an identifier to the keyword index of the asset, and add  
> that
> word to the search queries before executing the search itself. The
> downside of this is that it 'pollutes' the index. On the other hand,  
> why
> should I care? People will never search on those identifiers. As far I
> can see this has no performance impact.

Of the ideas you've presented this is probably the best one.

>    3) Create a seperate index for these Posts/Threads. This would seem
> like a Bad Thing in terms of duplicated effort and probably almost
> everything else too =). Another related option would be creating a  
> table
> containing assetIds of Post/Threads of this 'type'. That would be  
> better
> but seems like a too strong medicine too.

This is a horrible idea.


> Does anybody have comments/ideas/suggestions on this? Maybe there are
> better ways of doing this, that I haven't come up with. All the
> Post/Threads I'm refering too are below a custom CS (having its own
> className) but I haven't found a way of exploiting that in a way  
> that's
> not extremely over convoluted.


The only other ideas I can think of are:

4) Hide the regular CS search mechanism and write your own with an SQL  
report or custom asset.

5) Solve the original class inheritance problem, which seems a nearly  
impossible task at the moment.



JT Smith
ph: 703-286-2525 x810
fx: 312-264-5382

Create like a god. Command like a king. Work like a slave.



Back to Top
Rate [
|
]
 
 
martink
jt@plainblack.com wrote:
> JT wrote:
>
> 4) Hide the regular CS search mechanism and write your own with an SQL  
> report or custom asset.

The thing is that I'll have to search through all the 'custom'
Post/Threads in the site, not just below one CS. If that were the case
there wouldn't be a problem at all because all the Post/Threads are of
the right flavour already.

> 5) Solve the original class inheritance problem, which seems a nearly  
> impossible task at the moment.

I think the only way to solve that is to rigorously change the Thread
asset. Probably by putting it's code in a mixin or a trait. I've put too
many hours in getting it to work the way it is already, but it has kept
me off the streets =)

Thanks for the reply. It has convinced me all the more that option 2 is
the way to go. Nobody's gonna search for terms like
MySpecialCustomSlavePost or the like (and even if they do, nothing
breaks) and to implement it I'll only need a very small workflow
activity and an extended Search asset with only a couple of lines.

Martin


Back to Top
Rate [
|
]
 
 
     Discuss > WebGUI Dev



Recent Discussions Color Key

Design:

Development:

Et Cetera:

Install/Upgrade:  

Smoketest:

Template Group:


Re: Site paid for by advertizing by Klaus - Fri @ 02:27am

Smoke Test for WebGUI (Stable) (2008-11-21) by botaction - Fri @ 12:37am

Re: Site paid for by advertizing by pwrightson - Thu @ 10:59am

Re: Site paid for by advertizing by JT - Thu @ 08:58am

Re: Regelmäßiger Termin für Usertreffen in der Rhein-Neckar-Region by Klaus - Thu @ 06:11am

Smoke Test for WebGUI (Stable) (2008-11-20) by botaction - Thu @ 12:00am

Smoke Test for SVN (2008-11-20) by botaction - Thu @ 12:00am

Re: Improving page layouts by fdillon - Wed @ 08:38pm

Re: Improving page layouts by knowmad - Wed @ 08:25pm

Re: Site paid for by advertizing by knowmad - Wed @ 08:07pm

Re: SSL Configuration? by knowmad - Wed @ 07:51pm

Re: The Death of the Collaboration System by preaction - Wed @ 07:39pm