Thanks, Markus! It's really good that there is syntax for that - I can immediately implement RSS feeds for that.

As for inline - see my thoughts below:
I believe it would be disastrous to break query language compatibility between the two versions.

The other possible solution that was on my mind for a while already when I was thinking about query performance and other query related stuff is "named queries", e.g. we can have a namespace like "Query:" and pages on that namespace will define named queries and those queries can be used in both Ask and inline. {{#asknamed:Query:SuperQuery|format=broadtable}} will be the same as {{#ask:<text of SuperQuery>|format=broadtable}} and query will be expanded using page/time/user specific variables as it does right now.

- This way we can solve this issue (allow as complex queries as possible without putting then directly into the pages.
- In addition to this, it'll allow permissioning of free-form and named queries to be separate.
- I'll allow better URLs for Special:Ask (e.g. http://www.mywiki.org/Special:Ask/Query:SuperQuery or http://www.mywiki.org/Special:AskNamed/Query:SuperQuery) - good to replace huge URL-encoded queries that might not fit into GET limitation).
- might allow some heuristics for cacheing (e.g. if there are not page/time/user specific vars were used, then cache results more aggressively based on Query:SuperQuery page editing time).

Sorry if it's too much of the new functionality in this post ;)

     Sergey


On Tue, Mar 11, 2008 at 11:03 AM, Markus Krötzsch <mak@aifb.uni-karlsruhe.de> wrote:
You do indeed need a "union" or "disjunction". SMW supports disjunctions in
queries (with possible minor bugs since it is not well-tested). But #ask
currently has no syntax for that.

An example with SemWeb-Series and Open-Source-Topic conferences is the
following:

http://www.techpresentations.org/Special:Ask?title=Special%3AAsk&q=%5B%5BCategory%3AConference%5D%5D%0D%0A%3Cq%3E%0D%0A+%5B%5BTopic%3A%3AOpen+Source%5D%5D%0D%0A%7C%7C%0D%0A+%5B%5BSeries%3A%3A%0D%0A++%3Cq%3E%5B%5BTopic%3A%3ASemantic+Web%5D%5D%0D%0A+++++%5B%5BCategory%3AConference+Series%5D%5D%3C%2Fq%3E%5D%5D%0D%0A%3C%2Fq%3E%0D%0A%5B%5BEnd+date%3A%3A%3E2008-01-01%5D%5D&po=%3FStart+date%0D%0A%3FEnd+date%0D%0A%3FTopic%0D%0A%3FSeries%0D%0A&sort=Start+date&order=ASC&eq=yes

You see the #ask problem: "||" is used for disjunctions and this is already
taken in #ask context. <q>...</q> can be used for setting up parentheses. The
example also shows how you can sort the overall result list by some common
property.

Should we use "OR" or "UNION" for top-level disjunctions (not language
neutral)? Or should we somehow try and hack support for ||?

Cheers,

Markus

>
> On Mon, Mar 3, 2008 at 6:14 PM, Sergey Chernyshev <
>
> semediawiki-user@antispam.sergeychernyshev.com> wrote:
> > Fellow SMW users,
> >
> > I'm trying to create an inline query and having troubles with it. I'm
> > just wondering if anybody tried something like this.
> > Basic idea is that I want to have a "union" of two queries:
> >
> > [[Category:Conference]]
> > [[Series::<q>[[Topic::Semantic Web]] [[Category:Conference Series]]</q>]]
> > [[End date::>2008-03-03]]
> >
> > (in ask
> > interface<http://www.techpresentations.org/Special:Ask?title=Special%3AAs
> >k&q=%5B%5BCategory%3AConference%5D%5D%0D%0A%5B%5BSeries%3A%3A%3Cq%3E%5B%5B
> >Topic%3A%3ASemantic+Web%5D%5D+%5B%5BCategory%3AConference+Series%5D%5D%3C%
> >2Fq%3E%5D%5D%0D%0A%5B%5BEnd+date%3A%3A%3E2008-03-03%5D%5D&po=%3FLocation%0
> >D%0A%3FCFP+Paper+Deadline%0D%0A%3FStart+date%0D%0A%3FEnd+date%0D%0A&sort=&
> >order=ASC&eq=yes>) and
> >
> > [[Category:Conference]]
> > [[Topic::Semantic Web]]
> > [[End date::>2008-03-03]]
> >
> > (in ask
> > interface<http://www.techpresentations.org/Special:Ask?title=Special%3AAs
> >k&q=%5B%5BCategory%3AConference%5D%5D%0D%0A%5B%5BTopic%3A%3ASemantic+Web%5
> >D%5D%0D%0A%5B%5BEnd+date%3A%3A%3E2008-03-03%5D%5D&po=%3FLocation%0D%0A%3FC
> >FP+Paper+Deadline%0D%0A%3FStart+date%0D%0A%3FEnd+date%0D%0A&sort=&order=AS
> >C&eq=yes> ).
> >
> > Essentially, I need to find all conferences that have Topic value of
> > "Semantic Web" plus all conferences which belong to conference series
> > which in order have Topic value of "Semantic Web".
> >
> > It looks like disjunctions are not going to help me. But don't see any
> > other way to join these two queries.
> > The thing is that I want them all to have [[End date::>2008-03-03]]
> > condition, de-duped and ordered accordingly.
> >
> > P.S. on another note, it might be a good idea for Special:Ask to have a
> > button to generate associated inline query because it's quite painful to
> > re-type it later. Plus it should probably implement all the formatting
> > features and stuff. Just a wish of dedicated user ;)

OK; wish recorded mentally (of course you may wish to record it in bugzilla as
well).