You are here: Foswiki>Tasks Web>Item9166 (16 Mar 2011, GeorgeClark)Edit Attach

Item9166: System.QuerySearch and its meta maps: throw more errors, improve docs

Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: SEARCH, Documentation
Reported By: PaulHarvey
Waiting For:
Last Change By: GeorgeClark
An avid user of DBQUERY, trying to convert my apps to standard SEARCH, I wasted half an hour fiddling with a query that eventually ended up like this:


If I had read QuerySearch more carefully, I should have realised that parent in SEARCH is in fact a map rather than a string.

It should have been "'Foo'"

What needs to happen:
  • Throw an (inline) error when trying to compare a map to a string
  • Document this more clearly somehow, hopefully with more examples.

I am wondering a little about why we need a map representing the parent topic; it should be possible to point to metadata on the topic parent by using some sort of dereference syntax, Eg. 'parent'/info.version - DBQUERY uses something like

-- PaulHarvey - 16 Jun 2010

The WaitingFor topic is [[%QUERY{"WaitingFor"}%]] at version No.  %QUERY{"'%QUERY{"WaitingFor"}%'/info.version"}%

The WaitingFor topic is [[]] at version No. 63

-- PaulHarvey - 16 Jun 2010

That's where I started in DBCacheContrib, resolving to a map. However it caused more confusion in the code, because it had to carry a lot of schema information around. By treating the META:TOPICPARENT object as a map (and the fields therein as strings) I was able to vastly simplify the code.

Regraded as Enhancement and confirmed.

-- CrawfordCurrie - 24 Jun 2010

Documentation component taken care of in Item9415

-- PaulHarvey - 01 Aug 2010

ItemTemplate edit

Summary QuerySearch and its meta maps: throw more errors, improve docs
ReportedBy PaulHarvey
Codebase trunk
SVN Range
AppliesTo Engine
Component SEARCH, Documentation
Priority Enhancement
CurrentState Confirmed
TargetRelease n/a
ReleasedIn n/a
Topic revision: r5 - 16 Mar 2011, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy