From semantic-mediawiki.org
Jump to: navigation, search
Full-text searchFulltext/Searching

In addition to the regular combination of tildes (~) and asterisk (*) wildcards, as explained elsewhere on this wiki, full-text search also offers some additional features.

Phrase matching (both uppercase and lowercase)

Phrase matching is done by putting double quotes on either side of the phrase ("..."). This works for both uppercase and lowercase characters.

example taken from [1]

text indexed with Property:Has text:

... The principles of definition, the law of contradiction, the fallacy of arguing in a circle, the distinction between the essence and accidents of a thing or notion, between means and ends, between causes and conditions; also the division of the mind into the rational, concupiscent, and irascible elements, or of pleasures and desires into necessary and unnecessary --these and other great forms of thought are all of them to be found in the Republic, and were probably first invented by Plato. The greatest of all logical truths, and the one of which writers on philosophy are most apt to lose sight, the difference between words and things, has been most strenuously insisted on by him, although he has not always avoided the confusion of them in his own writings. ...

example query:

{{#ask: [[Has text::~"probably first invented by plato"]]
 |?Has text

(note the difference between Plato (with an uppercase initial) in the original text and plato as part of the query string)

Wide proximity

Broad text search tries to match a string text without a specific property to broaden possible result matches. To initiate a fulltext match search specific an additional ~ will indicate to the QueryEngine to use the fulltext index.

  • [[!~~ Sapien nulla enim]] to be translated into (MATCH(t0.o_text) AGAINST ('-sapien nulla enim' IN BOOLEAN MODE) )
  • [[~~ Sapien nulla enim]] to be translated into (MATCH(t0.o_text) AGAINST ('sapien nulla enim' IN BOOLEAN MODE) )