[pmwiki-users] smarter PageStore::ls() parameters?
Martin Fick
mogulguy at yahoo.com
Mon Oct 16 16:18:11 CDT 2006
--- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
> On Mon, Oct 16, 2006 at 10:54:22AM -0700, Martin
> Fick wrote:
> > If you are going to add a Select() to the
> > pagestore it would be
> > nice if it took other kinds of search parameters
> > and were sturctured something like this:
> >
> > Select($namepats, $attpats)
> >
> > where $namepats is equivalent to what the current
> > $pats is for ls() and
> > the $attpats is an array indexed by attribute
> > which contains an array
> > of patterns to match for that specific page
> > attribute (which could
> > include the page text). This seems particularly
> > useful if things are going to be stored in a db.
>
> Either (1) you're saying exactly what I said --
> i.e., the pagelist options
> would be passed to the ls()/select() method, (2)
> you're greatly
> oversimplifying things, or (3) I'm totally
> misunderstanding what you're suggesting.
Not sure which one it is... :)
I think that I am saying something similar to what you
said, but adding the ability to filter on attributes.
> Assuming you mean "page attribute" in the way that I
> use the term -- i.e., a key/value pair that is
> stored in the individual page files --
Yes, we are speaking apples to apples.
> then this doesn't seem to be at all helpful. Very
> few of the arguments that we give to (:pagelist:)
> have an exact or meaningful correspondence directly
> to a page attribute. In fact, with the possible
> exception of text= , all of the ones that would have
> such a mapping are already being handled by the
> present system.
This could be where I am way off, but I was thinking
that the targets= attribute would be very important
for many pagelists (Categories). If storing pages in
a DB, it seems like categories should be optimized
with the DB, instead of the pageindex.
Also, as you pointed out, this would include the text=
sections. Allowing the db to perform (optimize) text
searches also seems approriate? Text searching speed
is currently still an issue for some people I believe.
Would not a page text variable {$:var} search also be
able to take advantage of this?
I can't help but think that there are other attributes
that people filter (or would like to filter) on? Last
update time, last author, title? And, of course, any
custom attributes,
-Martin
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the pmwiki-users
mailing list