I've done pretty much what you describe here; using a form and template to get custom query results.
I think the problem, though, is that isn't a "Search" page; it's a report.
 In a search page, the ASK query would be parameterized:

{{#ask:[[Category:Art Objects]]|[[description::{{{theSearchTerm}}}]]|link=none|template=Art object query}}

And even then, you've got the specify the fields (description), work out the wildcard issues, it's only searching semantic properties, etc. 
AND that template/form is just one page; what happens if two people do a search at once.
So, I don't this ASK is really appropriate for SEARCH.

a SEARCH page, would use the search input at the top, leverage the existing search functionality (all the indexing, full-text searching, etc), and then would sort out the results display according to some template.

In my installation, I use the Woogle search extension, because it allows me to index the generated page (I use lots of externalData calls), instead of indexing the page text as stored in the db. And there's been some chatter on putting more semantic power into the search results. This could involve faceting, output templates, etc. That's what I'd like to see happen. Reading through the woogle project management site, I've seen this topic raised, and even seen where in the code this kind of work would go.

Don



From: Yaron Koren <yaron57@gmail.com>
To: Ian Stokes-Rees <ijstokes@alumni.uwaterloo.ca>
Cc: semediawiki-devel@lists.sourceforge.net
Sent: Fri, December 10, 2010 12:58:30 PM
Subject: Re: [SMW-devel] Modifying SMW search results to include image thumbnails

Hi,

I'm not sure if I fully understood this, but if so, I don't think you need to modify the code, or use additional extensions, for that matter. If you have a query like:

{{#ask:[[Category:Art objects]]|link=none|template=Art object query}}

...and then, in template "Art object query", something like:

[[File:{{{1}}}.jpg|thumb|link={{{1}}}]] [[{{{1}}}]]

...it should work. The key is the "link=none", which displays just the name of each page, and not a link.

Although really, I would say you should have each page link to its image using a semantic property, instead of just assuming that it's "page name.jpg". Then the query could be even easier:

{{#ask:[[Category:Art objects]]|?Has image}}

If I remember correctly, image pages are by default displayed as thumbnails within SMW queries.

For your second question - if you're arguing that every image displayed within a page should by default have a property (like maybe even "Has image") pointing to it, that could be a reasonable feature. Though dates and locations would be a lot harder to implement, and probably not all that helpful. That's assuming I understood the question correctly.

-Yaron


On Fri, Dec 10, 2010 at 12:33 PM, Ian Stokes-Rees <ijstokes@alumni.uwaterloo.ca> wrote:


On 12/10/10 11:52 AM, Jie Bao wrote:
> You can easily do this using templates (e.g. [2]) and icon extension
> [3], for example [1]


Thanks, those are useful.

The main thing for me, however, is that I want the built-in SMW
functionality to automagically have date, image, and location properties
taken into account in the *existing* search functionality, and to
provide those results in timelines, image galleries, and maps.  Even
without that, a great first step would be to have a small image
thumbnail beside every page link that had an image associated with it, and

SMW_DV_WikiPage.php:getLongHTMLText()

really seems to be the best place to make such a change.

Ian

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel



--
WikiWorks MediaWiki Consulting http://wikiworks.com