Return-Path: Delivered-To: apmail-incubator-jspwiki-user-archive@locus.apache.org Received: (qmail 53716 invoked from network); 12 Jun 2008 17:15:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jun 2008 17:15:29 -0000 Received: (qmail 53141 invoked by uid 500); 12 Jun 2008 17:15:32 -0000 Delivered-To: apmail-incubator-jspwiki-user-archive@incubator.apache.org Received: (qmail 52996 invoked by uid 500); 12 Jun 2008 17:15:32 -0000 Mailing-List: contact jspwiki-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-user@incubator.apache.org Delivered-To: mailing list jspwiki-user@incubator.apache.org Received: (qmail 52985 invoked by uid 99); 12 Jun 2008 17:15:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2008 10:15:31 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Janne.Jalkanen@ecyrd.com designates 193.64.5.122 as permitted sender) Received: from [193.64.5.122] (HELO mail.ecyrd.com) (193.64.5.122) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2008 17:14:39 +0000 Received: from [192.168.0.12] (cs181005170.pp.htv.fi [82.181.5.170]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.ecyrd.com (Postfix) with ESMTP id 4D93C4802E for ; Thu, 12 Jun 2008 20:14:41 +0300 (EEST) Mime-Version: 1.0 (Apple Message framework v753) In-Reply-To: <3976ba360806120859l58e708cx5d0a8efd7aac6126@mail.gmail.com> References: <2ab9580b0806101319p7bff5ederf860afed28d857c6@mail.gmail.com> <484EFEBB.8030701@altheim.com> <15cc92000806102221x31c2b06au840cbfe3ed23154f@mail.gmail.com> <3976ba360806120859l58e708cx5d0a8efd7aac6126@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7659AAC1-9043-43E8-BEE6-56C76D3E5452@ecyrd.com> Content-Transfer-Encoding: 7bit From: Janne Jalkanen Subject: Re: Adding a little structure Date: Thu, 12 Jun 2008 20:14:26 +0300 To: jspwiki-user@incubator.apache.org X-Mailer: Apple Mail (2.753) X-Virus-Checked: Checked by ClamAV on apache.org 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 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 >> >> 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 >> === = = >>> 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 >>> >>