LibreIdea:Make a query

From LibreIdea
Jump to: navigation, search
Espace LibreIdea
Problématique formaliser les limites de la connaissance - demande - proposition de loi - système WISF pour classifier - exemples de problématiques - conférence sur la formalisation des limites de la connaissance
Ingénie aide à la décision - système WIS pour classifier
Coci ingenie creation work session - autumn ingenies of tagtree - collaborative keywords mixing
LibreIdea présentation - contribuer au contenu - contribuer à l'outil - amélioration continue - document exhaustif - l'inventivité c'est parfois si simple et pourtant - partenariat - notre motivation en image - Conférence "Inventons un nouveau paradigme de la recherche et de l'innovation" - todo list
Communication communiqué - contact - promouvoir
Sémantique requête - propriétés sémantiques - database
Aider l'aide - livre d'or - faire une donation - trouver un financement - arguments pour convaincre - signer la pétition - SWOT Collaborative - l'asso 1901 qui porte LibreIdea - templates - todo list
Evénement RMLL 2017

to make a query, there is two functions; ask to get multiple results, show to get only one result

Parser function #ask[edit]

It displays multiple results

{{#ask:
}}
  1. {{#ask:
  2. filter results
  3. display results
  4. output type
  5. }}

Parser function #show[edit]

A common usage of queries is to display only a single property value for a single page. For example, one could insert the slogan of an ingenie into some article, and use a query instead of manual copying to achieve this. SMW provides a special shortcut to make such queries simpler. For example, one can write

{{#show: Xb9 | ?Social media message-en }}

result is : " #libreidea presents the #ingenie: xb9 http://www.libreidea.org/Xb9 xb9 handles a lot of things"

{{#show: Xb9 | ?what is it keywords }}

result is : "treatment, language, correction, grammar, traitment, langage, grammaire, conjugaison, traduction, action, répondre, ordonner, traduire, collaboration, software"

{{#show: Xb9 | ?what is it for keywords }}

result is : "help, assist, human"

{{#show: Xb9 | ?Social media message-fr }}

result is : " #libreidea vous présente une #ingénie: xb9 http://www.libreidea.org/Xb9 Xb9 traite la langue"

Thus the advantage of using #show compared to #ask for querying single property values becomes visible.

filter results[edit]

[[page type::ingenie]] [[short description-en::+]] [[what is it for keywords::+]] etc.. In this example, you choose to display only results from:

  • ingenies
  • ingenies that have short description in english property
  • ingenies that have what is it for keywords property

display outputs[edit]

|? Short description-en |? What is it keywords etc..

output types (or format)[edit]

see for extra parameters they require

filtered[edit]

| format=filtered
| views=list
| list view type=list

globe[edit]

| format=tagcloud
| headers=show 
| widget=sphere 
| height=600 
| width=600

detail list[edit]

| format = ul

example : http://www.libreidea.org/index.php?title=Special%3AAsk&q=[[Category%3AIdea]]&po=%3FTitle-en%0D%0A%3FFile-en%0D%0A%3FWhat+is+it+keywords%0D%0A%3FCreation+date%23MEDIAWIKI%0D%0A&eq=yes&p[format]=ul&sort_num=&order_num=ASC&p[limit]=500&p[offset]=&p[link]=all&p[sort]=&p[headers]=show&p[mainlabel]=&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&p[sep]=%2C&p[template]=&p[columns]=1&p[userparam]=&p[introtemplate]=&p[outrotemplate]=&eq=yes

table[edit]

tag cloud[edit]

| format=tagcloud
| widget=wordcloud

http://semantic-mediawiki.org/wiki/Help:Tagcloud_format

timeline[edit]

| format=timeline

slideshow[edit]

| format=slideshow

gallery[edit]

we use instantcommons so maybe it is not possible

datatables[edit]

| format=datatables

broadtable[edit]

| format = broadtable

example:

IdeaTitle-enWhat is it keywordsCreation date
This property is a special property in this wiki.
System that records all the user changes of an opensource distributionSystem that records all the user changes of an opensource distributionsoftware
backup
data
installation
operating system
20:11, 18 October 2015
Rigoles inclineessystem
distribution
product
object
market
just
time
23:12, 26 June 2017
Journee nationale du parler fort"speak out loud" dayevent
day
speak
loud
human
06:26, 21 February 2018
... further results

example 2: http://www.libreidea.org/index.php?title=Special%3AAsk&q=[[Category%3AIdea]]&po=%3FTitle-en%0D%0A%3FWhat+is+it+keywords%0D%0A%3FCreation+date%23MEDIAWIKI%0D%0A&eq=yes&p[format]=broadtable&sort_num=&order_num=ASC&p[limit]=100&p[offset]=&p[link]=all&p[sort]=&p[order][random]=1&p[headers]=show&p[mainlabel]=Idea&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&p[class]=sortable+wikitable+smwtable&eq=ye

eventcalendar[edit]

| format = eventcalendar

example : http://www.libreidea.org/index.php?title=Special%3AAsk&q=[[Category%3AIdea]]&po=%3FTitle-en%0D%0A%3FWhat+is+it+keywords%0D%0A%3FCreation+date%23MEDIAWIKI%0D%0A&eq=yes&p[format]=eventcalendar&sort_num=&order_num=ASC&p[limit]=100&p[offset]=&p[link]=all&p[sort]=&p[order][random]=1&p[headers]=show&p[mainlabel]=Idea&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&p[class]=sortable+wikitable+smwtable&eq=yes

category[edit]

| format = category

example : http://www.libreidea.org/index.php?title=Special%3AAsk&q=[[Category%3AIdea]]&po=%3FTitle-fr%0D%0A%3Fshort+description-fr%0D%0A&eq=yes&p[format]=category&sort_num=&order_num=ASC&p[limit]=500&p[offset]=&p[link]=all&p[sort]=&p[headers]=show&p[mainlabel]=&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&p[columns]=3&p[delim]=&p[template]=&p[userparam]=&eq=yes

timeline or eventline[edit]

| format = timeline
or
| format = eventline

example : <nowikihttp://www.libreidea.org/index.php?title=Special%3AAsk&q=&po=%3FTitle-en%0D%0A%3FShort+description-en%0D%0A%3FWhat+is+it+keywords%0D%0A%3FCreation+date%23MEDIAWIKI%0D%0A&eq=yes&p[format]=eventline&sort_num=&order_num=ASC&p[limit]=500&p[offset]=&p[link]=all&p[sort]=&p[headers]=show&p[mainlabel]=&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&p[timelinesize]=300px&p[timelineposition]=middle&p[timelinestart]=&p[timelineend]=&p[template]=&eq=yes</nowiki>

embedded[edit]

| format = embedded

example : http://www.libreidea.org/index.php?title=Special%3AAsk&q=[[Category%3AIdea]]&po=%3FTitle-en%0D%0A%3FShort+description-en%0D%0A%3FWhat+is+it+keywords%0D%0A%3FCreation+date%23MEDIAWIKI%0D%0A&eq=yes&p[format]=embedded&sort_num=&order_num=ASC&p[limit]=3&p[offset]=&p[link]=all&p[sort]=&p[headers]=show&p[mainlabel]=&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&p[embedformat]=h1&eq=yes

latest[edit]

| format = latest

example : http://www.libreidea.org/index.php?title=Special%3AAsk&q=[[Category%3AIdea]]&po=%3FTitle-en%0D%0A%3FShort+description-en%0D%0A%3FWhat+is+it+keywords%0D%0A%3FCreation+date%23MEDIAWIKI%0D%0A&eq=yes&p[format]=latest&sort_num=&order_num=ASC&p[limit]=500&p[offset]=&p[link]=all&p[sort]=&p[headers]=show&p[mainlabel]=&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&eq=yes#

export in csv[edit]

| format = csv

example : http://www.libreidea.org/index.php?title=Special%3AAsk&q=[[Category%3AIdea]]&po=%3FTitle-en%0D%0A%3Ffile-en%0D%0A%3FWhat+is+it+keywords%0D%0A%3FCreation+date%23MEDIAWIKI%0D%0A&eq=yes&p[format]=csv&sort_num=&order_num=ASC&p[limit]=500&p[offset]=&p[link]=all&p[sort]=&p[headers]=show&p[mainlabel]=&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&p[outlineproperties]=&eq=yes#

export in json[edit]

| format = json

example : http://www.libreidea.org/index.php?title=Special%3AAsk&q=[[Category%3AIdea]]&po=%3FTitle-en%0D%0A%3Ffile-en%0D%0A%3FWhat+is+it+keywords%0D%0A%3FCreation+date%23MEDIAWIKI%0D%0A&eq=yes&p[format]=outline&sort_num=&order_num=ASC&p[limit]=500&p[offset]=&p[link]=all&p[sort]=&p[headers]=show&p[mainlabel]=&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&p[outlineproperties]=&eq=yes#

rss or atom[edit]

| format = feed

example : http://www.libreidea.org/index.php?title=Special%3AAsk&q=[[Category%3AIdea]]&po=%3FTitle-en%0D%0A%3FFile-en%0D%0A%3FWhat+is+it+keywords%0D%0A%3FCreation+date%23MEDIAWIKI%0D%0A&eq=yes&p[format]=feed&sort_num=&order_num=ASC&p[limit]=500&p[offset]=&p[link]=all&p[sort]=&p[headers]=show&p[mainlabel]=&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&p[type]=rss&p[title]=&p[description]=&p[page]=none&eq=yes

count numbers[edit]

| format = count

example : {{#ask:[[page type::ingenie]] |format=count }}

numbers of ingenies; 310

example : {{#ask:[[page type::research question]] |format=count }}

numbers of research questions; 223

earliest[edit]

| format = earliest

example : {{#ask:[[page type::ingenie]] |?Creation date#MEDIAWIKI |format=earliest }}

first ingenie; 10 July 2003 22:06:45

latest[edit]

| format = latest

example : {{#ask:[[page type::research question]] |?Creation date#MEDIAWIKI|format=latest }}

last research question; 7 February 2019 22:58:08

valuerank[edit]

| format = valuerank

count kw example : http://www.libreidea.org/index.php?title=Special%3AAsk&q=[[page+type%3A%3Aingenie]]&po=%3FTitle-en%0D%0A%3FFile-en%0D%0A%3FWhat+is+it+keywords%0D%0A%3FCreation+date%23MEDIAWIKI%0D%0A&eq=yes&p[format]=valuerank&sort_num=&order_num=ASC&p[limit]=500&p[offset]=&p[link]=all&p[sort]=&p[headers]=show&p[mainlabel]=&p[intro]=&p[outro]=&p[searchlabel]=...+further+results&p[default]=&p[min]=1&p[maxtags]=1000&p[template]=&p[userparam]=&p[introtemplate]=&p[outrotemplate]=&p[liststyle]=ul&p[class]=sortable+wikitable+smwtable&eq=yes

Querying for queries[edit]

https://www.semantic-mediawiki.org/wiki/Help:Querying_for_queries

eventcalendar[edit]

| format = eventcalendar

example :

eventcalendar[edit]

| format = eventcalendar

example :




diaporama

explication[edit]

  • the + is used like an * - it says all results which have a this property filled
  • [[what is it for keywords::education]] all rq/ideas about education

not exhaustive list[edit]

[[page type::research question]] [[page type::ingenie]] [[page type::project]]

[[short description-en::+]] [[what is it for keywords::education]]
[[creation date::+]] [[short description-fr::+]] (only for rq) [[short description-en::+]] [[category::+]]



You can use these differents part of code to see how it works:




<!-- =============== IDEAS HIGHLIGHT =============== -->
{{#ask:
[[page type::ingenie]] [[short description-en::+]] [[keywords occurrences::+]] 
|?Short description-en
|?What is it keywords
| format=slideshow
| template=Slogans
| nav controls=no
| delay=4
| height=80px
| width=85%
| effect=slide left
| order=random
| limit=8
}}



{|class="wikitable"
|
{{#ask:[[keywords occurrences::+]]
|?What is it keywords
|format=tagcloud
|limit=200
|link=all
|headers=show
|tagorder=alphabetical
|increase=log
|widget=wordcloud
|height=100%
|width=100%
|template=make link wis
}}


{| width="100%" style="border:3px solid green; border-radius: 1em; background:green; color:white;text-align:center"
| Research questions timeline / Frise chronologique des problématiques
|-
|
{{#ask: [[page type::research question]] [[creation date::+]]
| ?title-en
| ?short description-en
| ?title-fr
| ?short description-fr
| ?author
| ?creation date
| sort=creation date
| order=descending
| format=timeline
| timelinebands=WEEK,MONTH,YEAR,DECADE
| timelineposition=end
| limit=200
}}
|-
|}

<br>

{| width="100%" style="border:3px solid yellow; border-radius: 1em; background:yellow; color:black;text-align:center"
| Ideas timeline / Frise chronologique des ingénies
|-
|
{{#ask: [[page type::ingenie]] [[creation date::+]]
| ?title-en
| ?short description-en
| ?title-fr
| ?short description-fr
| ?author
| ?creation date
| sort=creation date
| order=descending
| format=timeline
| timelinebands=WEEK,MONTH,YEAR,DECADE
<!-- =============== bug ===============avec cette ligne il n'affiche qu'une seule ingénie >> | timelineposition=end -->
| limit=200
}}
|-
|}

<br>

{| width="100%" style="border:3px solid red; border-radius: 1em; background:red; color:black;text-align:center"
| Projects timeline / Frise chronologique des projets
|-
|
{{#ask: [[page type::project]] [[creation date::+]]
| ?title-en
| ?short description-en
| ?title-fr
| ?short description-fr
| ?author
| ?creation date
| sort=creation date
| order=descending
| format=timeline
| timelinebands=WEEK,MONTH,YEAR,DECADE
| timelineposition=end
| limit=150
}}
|-
|}


{| width="100%" style="border:3px solid blue; border-radius: 1em; background: #CFF; color:black;text-align:center"
| Ideas DB / DB des ingénies
{{#ask:
 [[page type::ingenie]]
|?Author
|?Category
|?file-en
|?file-fr
|?Implemented ingenie
|?What is it keywords
|?Libre licence
|?Nationality
|?Number of modifications
|?Physical object
|?Primary key
|?Short description-en
|?Short description-fr
|?Stub
|?Title-en
|?Title-fr
|?With coci
|?Creation date
|?Liste des catégories
|?Modification date
|format=datatables
|link=all
|headers=show
|limit=500
}}
|-
|}



{{#ask:
[[page type::research question]] [[short description-en::+]] [[category::+]] 
|?Short description-en
|?category
| format=slideshow
| template=Slogans
| nav controls=no
| delay=8
| height=100px
| width=800px
| effect=slide left
| order=random
| limit=8
}}




{{#ask:
[[page type::ingenie]] [[short description-en::+]] [[keywords occurrences::+]] 
|?Short description-en
|?What is it keywords
| format=slideshow
| template=Slogans
| nav controls=no
| delay=8
| height=100px
| width=800px
| effect=slide left
| order=random
| limit=8
}}


{{#ask:
[[page type::research question]] [[short description-fr::+]] [[category::+]] 
|?Short description-fr
|?category
| format=slideshow
| template=Slogans
| nav controls=no
| delay=8
| height=100px
| width=800px
| effect=slide left
| order=random
| limit=8
}}



{{#ask:
[[page type::ingenie]] [[short description-fr::+]] [[keywords occurrences::+]] 
|?Short description-fr
|?What is it keywords
| format=slideshow
| template=Slogans
| nav controls=no
| delay=8
| height=100px
| width=800px
| effect=slide left
| order=random
| limit=8
}}

{{#ask:[[keywords occurrences::+]]
|?What is it keywords
|format=tagcloud
|headers=show
|tagorder=alphabetical
|widget=sphere
|height=800
|width=1200
|template=make link wis
}}