This is actually the conventional usage of inline queries - looking
for the subject (the first element) of triples. You would search for
[[Has friend::John Doe]], etc., or, if you want to use the same text
in every page, [[Has friend::{{PAGENAME}}]].-Yaron On 5/18/07, Sergey Chernyshev <[EMAIL PROTECTED]> wrote: > Does it work when Subject is defined as *? > > Like if you have a relation on Sergey's page defined as: > > Sergey knows [[Has friend::John Doe]] and [[Has friend::Jane Doe]] from > high school and [[Has friend::Peter Smith]] from college. > > and on Yaron's page defined as: > > Yaron knows [[Has friend::John Doe]] from college and [[Has > friend::Peter Smith]] from work. > > Regular query > > [[Has friend::*]] > > will return: > > Sergey John Doe > Jane Doe > Peter Smith > > Yaron John Doe > Peter Smith > > But what if I want to get result of "Is a friend of" (opposite to "Has > friend") and expect results like this: > > John Doe Sergey > Yaron > > Jane Doe Sergey > > Peter Smith Yaron > Sergey > > What kind of query should I run? [[*::Has friend]] doesn't seem to help ;( > > > > On 5/18/07, Yaron Koren <[EMAIL PROTECTED]> wrote: > > > > Well, my mistake - I tried it out, and it appears "inverse queries", > > i.e. queries that return the object of triples, given the subject, > > work. And it looks like the functionality has been in SMW for a > > while... for some reason, it's not mentioned in the help page > > (http://ontoworld.org/wiki/Help:Inline_queries), and I > couldn't see > > documentation anywhere else either. Is this a secret or unsupported > > feature? In any case, good to know. > > > > -Yaron > > > > > > On 5/17/07, Yaron Koren <[EMAIL PROTECTED]> wrote: > > > This question is a little confusing to think about (at least for me), > > > because "friend of" is, in real life, always a bi-directional > > > relationship. So let me substitute something that's more clearly > > > one-directional for this example: how about "has been to the house > > > of". > > > > > > Looking at it that way, I don't believe your first example will work. > > > I don't think there's any way to determine whom a person "has been to > > > the house of" - you can only find out who "has been to the house of" a > > > certain person. I think what you're looking for is an inverse query, > > > which isn't supported, though the issue has come up before on this > > > mailing list. > > > > > > -Yaron > > > > > > > > > On 5/17/07, Jim Wilson <[EMAIL PROTECTED] > wrote: > > > > Hi SMW Devs, > > > > > > > > Quick question: is there a way to get a list of all articles that meet > a > > > > reflexive criteria? > > > > > > > > For example, I've got a relation called "friend of", and I know how to > do > > > > these types of queries: > > > > > > > > <ask>[[User:Whoever]][[friend of::*]]</ask> - This will return all > articles > > > > that User:Whoever is a "friend of" > > > > > > > > <ask>[[friend of::User:Whoever]]</ask> - This will return all articles > that > > > > are "friends of" User:Whoever > > > > > > > > Is there a way to get the intersection of these two sets? Meaning, > everyone > > > > who is both "friend of" User:Whoever, and who User:Whoever says > they're > > > > "friend of"? > > > > > > > > Thanks in advance for your help - I really appreciate it. > > > > > > > > And if the answer is "no, there's no pure SMW way to do that", that's > fine > > > > too - I can find another solution. I just don't want to waste my time > > > > looking for one if SMW can get the job done on its own. > > > > > > > > Thanks! > > > > > > > > -- Jim R. Wilson (jimbojw) > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > _______________________________________________ > > > > Semediawiki-devel mailing list > > > > [email protected] > > > > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Semediawiki-devel mailing list > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Semediawiki-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Semediawiki-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
