You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Amit Prahesh <am...@gmail.com> on 2008/06/10 22:19:48 UTC

Adding a little structure

Hello,

I've been using and abusing JSPWiki for a while now, and it sure looks
perfect for my needs, I even made a custom template! I just love the
idea of a "freeform" knowledge database.

But I need just a little structure for a section of my app, and that's
my question. Imagine that I have a page called EmployeeAlice in which
I put a table, like this:

First name | Alice
Last name | Whatever
Department | Accounting
etc.

well, you get the idea. I also would like to have a page called
EmployeeBob which contains roughly the same structure:

First name | Bob
Last name | Whatever
Department | IT
etc.

you get the idea.

Now, is it possible, out of the box, or via plugins, to dynamically
sift through the pages (like Employee*) and get information from them?
Like creating a list of employees grouped by department, or maybe
reporting their salaries, etc.

Best regards,
Amit.

Re: Adding a little structure

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Take a look at the Search plugin - it might be enough for your needs!

/Janne

On Jun 10, 2008, at 23:19 , Amit Prahesh wrote:

> Hello,
>
> I've been using and abusing JSPWiki for a while now, and it sure looks
> perfect for my needs, I even made a custom template! I just love the
> idea of a "freeform" knowledge database.
>
> But I need just a little structure for a section of my app, and that's
> my question. Imagine that I have a page called EmployeeAlice in which
> I put a table, like this:
>
> First name | Alice
> Last name | Whatever
> Department | Accounting
> etc.
>
> well, you get the idea. I also would like to have a page called
> EmployeeBob which contains roughly the same structure:
>
> First name | Bob
> Last name | Whatever
> Department | IT
> etc.
>
> you get the idea.
>
> Now, is it possible, out of the box, or via plugins, to dynamically
> sift through the pages (like Employee*) and get information from them?
> Like creating a list of employees grouped by department, or maybe
> reporting their salaries, etc.
>
> Best regards,
> Amit.


Re: Adding a little structure

Posted by new2Jaas <ra...@gmail.com>.
Thanks a lot! That works!!


Janne Jalkanen wrote:
> 
> 
> Leave out the [ and ]. That is, use "query='name:{$username}'".   
> There's already a [ in the sentence, you don't need another one.
> 
> /Janne
> 
> On 12 Jun 2008, at 18:59, Ramya KGrama wrote:
> 
>> Hello:
>> I am looking at creating a "My Page(s)" link along similar lines.
>> I was successful enough to provide the user with a form that  
>> creates pages
>> with a structure like:
>> title, submitter, created fields.
>> When the user clicks "My Pages" in the left menu, I want to be able to
>> search the pages that he created, by using the wiki variable  
>> [{$username}]
>> in the TaskQuery.
>> This is what I tried - but doesnt return any values:
>> [{TasksQuery  select='title,created,owner'
>>   from='MyPage'
>>   where='submitter=[{$username}]'}]
>> I also tried escaping the'[' and '{' characters with '\' but  
>> doesn't work.
>> Is there a way to pass a variable name in the where clause instead  
>> of having
>> to hard code it.
>>
>> I also tried using the Search Plugin but got stuck at the very same  
>> point:
>> [{Search query='name:[{$username}]' max=10 }] did not work.
>>
>> Any help is highly appreciated.
>> Thanks!!
>>
>>
>>
>> On 6/11/08, Dirk Frederickx <di...@gmail.com> wrote:
>>>
>>> You also may want to look at http://www.jspwiki.org/wiki/TasksPlugin
>>>
>>>
>>> dirk
>>>
>>>
>>> On Wed, Jun 11, 2008 at 12:22 AM, Murray Altheim  
>>> <mu...@altheim.com>
>>> wrote:
>>>> Amit Prahesh wrote:
>>>> [...]
>>>>>
>>>>> Now, is it possible, out of the box, or via plugins, to dynamically
>>>>> sift through the pages (like Employee*) and get information from  
>>>>> them?
>>>>> Like creating a list of employees grouped by department, or maybe
>>>>> reporting their salaries, etc.
>>>>
>>>> As Janne mentioned, search is likely your best bet, if simplicity
>>>> and not wanting to do additional development work are your  
>>>> priorities.
>>>>
>>>> The downside of search is that it is full text and does not take  
>>>> into
>>>> account the context of a given word or phrase, i.e., if one searches
>>>> on a term the search engine will find it anywhere on any wiki page.
>>>> There is no current facility for searching on fields.
>>>>
>>>> I don't have any code available for distribution, but it's not
>>>> particularly difficult to modify JSPWiki for fielded searches. The
>>>> way I've approached this is to have a plugin that declares page- 
>>>> level
>>>> metadata that is picked up the Lucene search engine as fields, then
>>>> one can search on those fields.
>>>>
>>>> For example, a plugin might declare (via a form) the following  
>>>> metadata:
>>>>
>>>>   __field name__    __field value__
>>>>   title          :  The Hound of the Baskervilles
>>>>   author         :  Sir Arthur Conan Doyle
>>>>   language       :  English
>>>>
>>>> You'd have your plugin declare these name-value pairs as page-level
>>>> metadata, extend com.ecyrd.jspwiki.search.LuceneSearchProvider to
>>>> read the page metadata and add that as new Document fields, then  
>>>> your
>>>> users can search using
>>>>
>>>>   title:baskervilles  author:doyle
>>>>
>>>> etc.
>>>>
>>>> This isn't a trivial solution but it's not enormously difficult  
>>>> either.
>>>> Lucene's indexing functionality is relatively easy to extend. Using
>>>> this method one could use JSPWiki as a bibliographic or employee
>>>> database, etc.. where each page (i.e., those containing fielded  
>>>> data)
>>>> can serve as a database record. You could then add an additional
>>>> search JSP to make searching on those fields easier.
>>>>
>>>> Murray
>>>>
>>>>
>>> ..................................................................... 
>>> ......
>>>> Murray Altheim <murray07 at altheim.com>
>>> ===  = =
>>>> http://www.altheim.com/murray/                                     =
>>> =  ===
>>>> SGML Grease Monkey, Banjo Player, Wantanabe Zen  
>>>> Monk               = =  =
>>> =
>>>>
>>>>      Boundless wind and moon - the eye within eyes,
>>>>      Inexhaustible heaven and earth - the light beyond light,
>>>>      The willow dark, the flower bright - ten thousand houses,
>>>>      Knock at any door - there's one who will respond.
>>>>                                      -- The Blue Cliff Record
>>>>
>>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Adding-a-little-structure-tp17764712p17807217.html
Sent from the JspWiki - User mailing list archive at Nabble.com.


Re: Adding a little structure

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Leave out the [ and ]. That is, use "query='name:{$username}'".   
There's already a [ in the sentence, you don't need another one.

/Janne

On 12 Jun 2008, at 18:59, Ramya KGrama wrote:

> Hello:
> I am looking at creating a "My Page(s)" link along similar lines.
> I was successful enough to provide the user with a form that  
> creates pages
> with a structure like:
> title, submitter, created fields.
> When the user clicks "My Pages" in the left menu, I want to be able to
> search the pages that he created, by using the wiki variable  
> [{$username}]
> in the TaskQuery.
> This is what I tried - but doesnt return any values:
> [{TasksQuery  select='title,created,owner'
>   from='MyPage'
>   where='submitter=[{$username}]'}]
> I also tried escaping the'[' and '{' characters with '\' but  
> doesn't work.
> Is there a way to pass a variable name in the where clause instead  
> of having
> to hard code it.
>
> I also tried using the Search Plugin but got stuck at the very same  
> point:
> [{Search query='name:[{$username}]' max=10 }] did not work.
>
> Any help is highly appreciated.
> Thanks!!
>
>
>
> On 6/11/08, Dirk Frederickx <di...@gmail.com> wrote:
>>
>> You also may want to look at http://www.jspwiki.org/wiki/TasksPlugin
>>
>>
>> dirk
>>
>>
>> On Wed, Jun 11, 2008 at 12:22 AM, Murray Altheim  
>> <mu...@altheim.com>
>> wrote:
>>> Amit Prahesh wrote:
>>> [...]
>>>>
>>>> Now, is it possible, out of the box, or via plugins, to dynamically
>>>> sift through the pages (like Employee*) and get information from  
>>>> them?
>>>> Like creating a list of employees grouped by department, or maybe
>>>> reporting their salaries, etc.
>>>
>>> As Janne mentioned, search is likely your best bet, if simplicity
>>> and not wanting to do additional development work are your  
>>> priorities.
>>>
>>> The downside of search is that it is full text and does not take  
>>> into
>>> account the context of a given word or phrase, i.e., if one searches
>>> on a term the search engine will find it anywhere on any wiki page.
>>> There is no current facility for searching on fields.
>>>
>>> I don't have any code available for distribution, but it's not
>>> particularly difficult to modify JSPWiki for fielded searches. The
>>> way I've approached this is to have a plugin that declares page- 
>>> level
>>> metadata that is picked up the Lucene search engine as fields, then
>>> one can search on those fields.
>>>
>>> For example, a plugin might declare (via a form) the following  
>>> metadata:
>>>
>>>   __field name__    __field value__
>>>   title          :  The Hound of the Baskervilles
>>>   author         :  Sir Arthur Conan Doyle
>>>   language       :  English
>>>
>>> You'd have your plugin declare these name-value pairs as page-level
>>> metadata, extend com.ecyrd.jspwiki.search.LuceneSearchProvider to
>>> read the page metadata and add that as new Document fields, then  
>>> your
>>> users can search using
>>>
>>>   title:baskervilles  author:doyle
>>>
>>> etc.
>>>
>>> This isn't a trivial solution but it's not enormously difficult  
>>> either.
>>> Lucene's indexing functionality is relatively easy to extend. Using
>>> this method one could use JSPWiki as a bibliographic or employee
>>> database, etc.. where each page (i.e., those containing fielded  
>>> data)
>>> can serve as a database record. You could then add an additional
>>> search JSP to make searching on those fields easier.
>>>
>>> Murray
>>>
>>>
>> ..................................................................... 
>> ......
>>> Murray Altheim <murray07 at altheim.com>
>> ===  = =
>>> http://www.altheim.com/murray/                                     =
>> =  ===
>>> SGML Grease Monkey, Banjo Player, Wantanabe Zen  
>>> Monk               = =  =
>> =
>>>
>>>      Boundless wind and moon - the eye within eyes,
>>>      Inexhaustible heaven and earth - the light beyond light,
>>>      The willow dark, the flower bright - ten thousand houses,
>>>      Knock at any door - there's one who will respond.
>>>                                      -- The Blue Cliff Record
>>>
>>


Re: Adding a little structure

Posted by Ramya KGrama <ra...@gmail.com>.
Hello:
I am looking at creating a "My Page(s)" link along similar lines.
I was successful enough to provide the user with a form that creates pages
with a structure like:
title, submitter, created fields.
When the user clicks "My Pages" in the left menu, I want to be able to
search the pages that he created, by using the wiki variable [{$username}]
in the TaskQuery.
This is what I tried - but doesnt return any values:
[{TasksQuery  select='title,created,owner'
  from='MyPage'
  where='submitter=[{$username}]'}]
I also tried escaping the'[' and '{' characters with '\' but doesn't work.
Is there a way to pass a variable name in the where clause instead of having
to hard code it.

I also tried using the Search Plugin but got stuck at the very same point:
[{Search query='name:[{$username}]' max=10 }] did not work.

Any help is highly appreciated.
Thanks!!



On 6/11/08, Dirk Frederickx <di...@gmail.com> wrote:
>
> You also may want to look at http://www.jspwiki.org/wiki/TasksPlugin
>
>
> dirk
>
>
> On Wed, Jun 11, 2008 at 12:22 AM, Murray Altheim <mu...@altheim.com>
> wrote:
> > Amit Prahesh wrote:
> > [...]
> >>
> >> Now, is it possible, out of the box, or via plugins, to dynamically
> >> sift through the pages (like Employee*) and get information from them?
> >> Like creating a list of employees grouped by department, or maybe
> >> reporting their salaries, etc.
> >
> > As Janne mentioned, search is likely your best bet, if simplicity
> > and not wanting to do additional development work are your priorities.
> >
> > The downside of search is that it is full text and does not take into
> > account the context of a given word or phrase, i.e., if one searches
> > on a term the search engine will find it anywhere on any wiki page.
> > There is no current facility for searching on fields.
> >
> > I don't have any code available for distribution, but it's not
> > particularly difficult to modify JSPWiki for fielded searches. The
> > way I've approached this is to have a plugin that declares page-level
> > metadata that is picked up the Lucene search engine as fields, then
> > one can search on those fields.
> >
> > For example, a plugin might declare (via a form) the following metadata:
> >
> >   __field name__    __field value__
> >   title          :  The Hound of the Baskervilles
> >   author         :  Sir Arthur Conan Doyle
> >   language       :  English
> >
> > You'd have your plugin declare these name-value pairs as page-level
> > metadata, extend com.ecyrd.jspwiki.search.LuceneSearchProvider to
> > read the page metadata and add that as new Document fields, then your
> > users can search using
> >
> >   title:baskervilles  author:doyle
> >
> > etc.
> >
> > This isn't a trivial solution but it's not enormously difficult either.
> > Lucene's indexing functionality is relatively easy to extend. Using
> > this method one could use JSPWiki as a bibliographic or employee
> > database, etc.. where each page (i.e., those containing fielded data)
> > can serve as a database record. You could then add an additional
> > search JSP to make searching on those fields easier.
> >
> > Murray
> >
> >
> ...........................................................................
> > Murray Altheim <murray07 at altheim.com>
> ===  = =
> > http://www.altheim.com/murray/                                     =
> =  ===
> > SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  =
> =
> >
> >      Boundless wind and moon - the eye within eyes,
> >      Inexhaustible heaven and earth - the light beyond light,
> >      The willow dark, the flower bright - ten thousand houses,
> >      Knock at any door - there's one who will respond.
> >                                      -- The Blue Cliff Record
> >
>

Re: Adding a little structure

Posted by Dirk Frederickx <di...@gmail.com>.
You also may want to look at http://www.jspwiki.org/wiki/TasksPlugin


dirk


On Wed, Jun 11, 2008 at 12:22 AM, Murray Altheim <mu...@altheim.com> wrote:
> Amit Prahesh wrote:
> [...]
>>
>> Now, is it possible, out of the box, or via plugins, to dynamically
>> sift through the pages (like Employee*) and get information from them?
>> Like creating a list of employees grouped by department, or maybe
>> reporting their salaries, etc.
>
> As Janne mentioned, search is likely your best bet, if simplicity
> and not wanting to do additional development work are your priorities.
>
> The downside of search is that it is full text and does not take into
> account the context of a given word or phrase, i.e., if one searches
> on a term the search engine will find it anywhere on any wiki page.
> There is no current facility for searching on fields.
>
> I don't have any code available for distribution, but it's not
> particularly difficult to modify JSPWiki for fielded searches. The
> way I've approached this is to have a plugin that declares page-level
> metadata that is picked up the Lucene search engine as fields, then
> one can search on those fields.
>
> For example, a plugin might declare (via a form) the following metadata:
>
>   __field name__    __field value__
>   title          :  The Hound of the Baskervilles
>   author         :  Sir Arthur Conan Doyle
>   language       :  English
>
> You'd have your plugin declare these name-value pairs as page-level
> metadata, extend com.ecyrd.jspwiki.search.LuceneSearchProvider to
> read the page metadata and add that as new Document fields, then your
> users can search using
>
>   title:baskervilles  author:doyle
>
> etc.
>
> This isn't a trivial solution but it's not enormously difficult either.
> Lucene's indexing functionality is relatively easy to extend. Using
> this method one could use JSPWiki as a bibliographic or employee
> database, etc.. where each page (i.e., those containing fielded data)
> can serve as a database record. You could then add an additional
> search JSP to make searching on those fields easier.
>
> Murray
>
> ...........................................................................
> Murray Altheim <murray07 at altheim.com>                           ===  = =
> http://www.altheim.com/murray/                                     = =  ===
> SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =
>
>      Boundless wind and moon - the eye within eyes,
>      Inexhaustible heaven and earth - the light beyond light,
>      The willow dark, the flower bright - ten thousand houses,
>      Knock at any door - there's one who will respond.
>                                      -- The Blue Cliff Record
>

Re: Adding a little structure

Posted by Murray Altheim <mu...@altheim.com>.
Amit Prahesh wrote:
[...]
> Now, is it possible, out of the box, or via plugins, to dynamically
> sift through the pages (like Employee*) and get information from them?
> Like creating a list of employees grouped by department, or maybe
> reporting their salaries, etc.

As Janne mentioned, search is likely your best bet, if simplicity
and not wanting to do additional development work are your priorities.

The downside of search is that it is full text and does not take into
account the context of a given word or phrase, i.e., if one searches
on a term the search engine will find it anywhere on any wiki page.
There is no current facility for searching on fields.

I don't have any code available for distribution, but it's not
particularly difficult to modify JSPWiki for fielded searches. The
way I've approached this is to have a plugin that declares page-level
metadata that is picked up the Lucene search engine as fields, then
one can search on those fields.

For example, a plugin might declare (via a form) the following metadata:

    __field name__    __field value__
    title          :  The Hound of the Baskervilles
    author         :  Sir Arthur Conan Doyle
    language       :  English

You'd have your plugin declare these name-value pairs as page-level
metadata, extend com.ecyrd.jspwiki.search.LuceneSearchProvider to
read the page metadata and add that as new Document fields, then your
users can search using

    title:baskervilles  author:doyle

etc.

This isn't a trivial solution but it's not enormously difficult either.
Lucene's indexing functionality is relatively easy to extend. Using
this method one could use JSPWiki as a bibliographic or employee
database, etc.. where each page (i.e., those containing fielded data)
can serve as a database record. You could then add an additional
search JSP to make searching on those fields easier.

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record