Help:ASK

MyWikiBiz, Author Your Legacy — Friday November 22, 2024
Revision as of 16:30, 3 October 2007 by MyWikiBiz (talk | contribs) (Adding another example of a powerful ASK query)
Jump to navigationJump to search

See also Inline queries for more detailed explanations regarding semantic searches.

ASK is perhaps Centiare's most powerful tool for searching for information in the directory. It can be used in conjunction with or as an alternative to the Search Triple form-based search tool. Only registered users may create these ASK queries.


Example 1

Suppose you were interested in displaying all of the Centiare articles where a Latitude attribute between 36 degrees and 42 degrees North has been tagged by an editor. The following example ASK query...

<ask>
[[City:=*]]
[[State Code:=*|State]]
[[Zip:=*]]
[[Latitude:=>36.0]][[Latitude:=<40.0]][[Latitude:=*|Latitude]]
</ask>

...instantaneously produces this report when the page is saved:

<ask> * State * >36.0Property "Latitude" (as page type) with input value ">36.0" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.<40.0Property "Latitude" (as page type) with input value "" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.Latitude </ask>


Example 2

Suppose you wanted to find all the Centiare articles that identify something in Canada (Country Code is "CA"), but only those that indicate that the subject is incorporated in the state of New York (Incorporation State is "NY"). You also want the phone number of any of the matches. The following example ASK query...

<ask>
[[City:=*]]
[[State Code:=*|State]]
[[Zip:=*]]
[[Phone:=*]]
[[Country Code:=CA]]
[[Incorporation State:=NY]]
</ask>

...instantaneously produces this report when the page is saved:

<ask> * State * * CA NY </ask>




Of course, these are just examples, and ASK queries may be written to be as inclusive or restrictive of qualifying attributes as the author wishes. We recommend that you experiment with your own ASK queries on your User page (or sub-page) before you implement them in Directory or Main Space pages.