[Mulgara-general] How to order by count, keep getting No such variable $k0 in tuples

Doug Chestnut chestnut at apache.org
Fri Feb 20 01:37:15 UTC 2009


Hi mulgara users,

I am trying make a faceted browse web interface with jquery and have
come up with this query which gives me the type of data I need for
facet counts (first stab at it anyway).

select $Subject  count (
  select $s from <rmi://localhost/server1#sampledata> where $s $p $Subject
) from <rmi://localhost/server1#sampledata> where $Subject $Predicate
<http://simile.mit.edu/2006/01/ontologies/mods3#Topic> order by $k0
desc limit 10;

This query works great from the tutorial web form, but returns the
following error when I try to use the tql http service (from the
second try on):

Query failed: No such variable $k0 in tuples [$Subject, $k1] (class
org.mulgara.resolver.AppendAggregateTuples)

This appears to be some sort of session problem ($kn keeps getting
incremented), as if I try in a different browser it works, again only
on the first try.

I am using the query (above query url encoded) and the format (json)
parameters with the tql path.

Sorry if I have missed this in the docs or the mailing list, any help
is much appreciated.

--Doug



More information about the Mulgara-general mailing list