{"id":4,"date":"2024-04-03T23:25:29","date_gmt":"2024-04-03T20:25:29","guid":{"rendered":"https:\/\/sisu.ut.ee\/principles\/building-query\/"},"modified":"2026-02-05T19:38:29","modified_gmt":"2026-02-05T17:38:29","slug":"building-query","status":"publish","type":"page","link":"https:\/\/sisu.ut.ee\/principles\/building-query\/","title":{"rendered":"Building a query"},"content":{"rendered":"<p>The most essential factor in formulating a query is the skilful combining of search words and using different techniques in order to formulate the subject as clearly and precisely as possible. The search words can be combined using the following techniques.<\/p>\n<h5><span style=\"color: #888888; font-size: medium;\" data-mce-mark=\"1\"><span style=\"color: #3a58c5;\" data-mce-mark=\"1\">Boolean operators<\/span><\/span><\/h5>\n<p><span style=\"line-height: 1.6em;\" data-mce-mark=\"1\">The search can be extended or limited by Boolean logical operators <\/span><strong style=\"line-height: 1.6em;\"><span style=\"background-color: #ff0000;\" data-mce-mark=\"1\">AND<\/span>,<span style=\"background-color: #ffff00;\" data-mce-mark=\"1\"> OR <\/span><\/strong><span style=\"line-height: 1.6em;\" data-mce-mark=\"1\">or<\/span><strong style=\"line-height: 1.6em;\"><span style=\"background-color: #339966;\" data-mce-mark=\"1\"> NOT<\/span>.<\/strong><\/p>\n<dl>\n<dt><\/dt>\n<dt><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"439\" class=\"alignnone wp-image-9\" title=\"rockwell_schrocks_boolean_machine.png\" src=\"https:\/\/sisu.ut.ee\/wp-content\/uploads\/sites\/89\/rockwell_schrocks_boolean_machine.png\" alt=\"rockwell_schrocks_boolean_machine.png\" srcset=\"https:\/\/sisu.ut.ee\/wp-content\/uploads\/sites\/89\/rockwell_schrocks_boolean_machine.png 709w, https:\/\/sisu.ut.ee\/wp-content\/uploads\/sites\/89\/rockwell_schrocks_boolean_machine-300x186.png 300w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\"><\/dt>\n<dt><\/dt>\n<dt><span style=\"font-size: revert;\">Boolean machine <\/span><a style=\"font-size: revert;\" title=\"\" href=\"http:\/\/rockwellschrock.com\/rbs3k\/boolean\/index.htm\" target=\"_blank\" rel=\"noopener\">http:\/\/rockwellschrock.com\/rbs3k\/boolean\/index.htm<\/a><\/dt>\n<\/dl>\n<p><strong>AND<\/strong> limits the search, finding documents that contain the words connected by AND in the query<\/p>\n<p><strong>Example:\u00a0<em>television AND violence<\/em><\/strong>\u00a0\u2013 presents documents where both\u00a0<em>television<\/em>\u00a0and\u00a0<em>violence<\/em>\u00a0can be found.<\/p>\n<p><strong>OR<\/strong>\u00a0extends the search, finding documents containing\u00a0<em>television<\/em>, as well as those containing\u00a0<em>violence<\/em>.<\/p>\n<p><strong>Example:\u00a0<em>violence OR aggression<\/em><\/strong>\u00a0\u2013 presents documents containing only\u00a0<em>violence<\/em>, only\u00a0<em>aggression<\/em>\u00a0or both of these words.<\/p>\n<p>It is practical to use operator OR to connect<\/p>\n<ul>\n<li>synonyms<br>\n<em style=\"line-height: 1.6em;\">student OR pupil<\/em><\/li>\n<\/ul>\n<ul>\n<li>words with different spelling<br>\n<em>organization OR organisation<\/em><\/li>\n<\/ul>\n<ul>\n<li>related words and phrases, or those of similar meaning<br>\n<em>children OR adolescents<\/em><br>\n<em>antisocial behaviour OR deviant behaviour<\/em><br>\n<em>antisocial OR criminal<\/em><\/li>\n<\/ul>\n<p><strong>NOT<\/strong>\u00a0limits the search \u2013 the document has to contain the first word, but not the other one, making it possible to exclude the presence of some words in the results.<\/p>\n<p><strong>Example:\u00a0<em>antisocial NOT criminal<\/em>\u00a0<\/strong>\u2013 finds documents containing\u00a0<em>antisocial<\/em>, but excludes those containing\u00a0<em>criminal<\/em>.<\/p>\n<h5><span style=\"color: #3a58c5; font-size: medium;\" data-mce-mark=\"1\">Proximity operators<\/span><\/h5>\n<p>Many databases make use of proximity operators (NEAR, ADJ, etc.) that help to make the search more precise, as they let to specify how near to each other the words have to stand in the text. The likelihood of finding the words you are searching for in one and the same context is, this way, bigger. Often, it is more practical to use proximity operators instead of AND.<\/p>\n<p><strong>Example:\u00a0<em>media N3 violence<\/em>\u00a0<\/strong>\u2013 retrieves documents where\u00a0<em>media<\/em>\u00a0and\u00a0<em>violence<\/em>\u00a0stand three words apart from each other independent of their succession, finding both\u00a0<em>media violence<\/em>\u00a0and\u00a0<em>violence in media<\/em>.<\/p>\n<p>Proximity operators and their functions may differ in different databases, therefore, while searching a database for the first time, be sure to consult HELP to get familiar with the database.<\/p>\n<h5><span style=\"color: #4a87bf; font-size: medium;\" data-mce-mark=\"1\"><span style=\"color: #4767b8;\" data-mce-mark=\"1\">Phrase search<\/span><strong>\u00a0<\/strong><\/span><\/h5>\n<p>Phrase search is used to find documents containing a specific phrase or sentence. The phrase or sentence is usually put into quotation marks.<\/p>\n<p><strong>Example:\u00a0<\/strong><br>\n<strong><em>\u201cmedia violence\u201d<\/em>\u00a0<\/strong>\u2013 retrieves documents containing precisely this phrase.<\/p>\n<p>If the same meaning may probably be conveyed in different wording or if you cannot form the exact phrase, better use the proximity search with the same words.<\/p>\n<p>Often, several words together are automatically searched as a phrase, even without quotation marks, but in some databases they are connected with the operator AND, meaning that all of them have to be found in the text independent of their location in it. You have to make sure before the search or during the search, which of these versions are working in the database.<\/p>\n<h5><span style=\"color: #000080; font-size: medium;\"><span style=\"color: #4a87bf;\">Truncation\u00a0<\/span><\/span><\/h5>\n<p>Truncation\u00a0allows searching for words with the same stem, but different endings.<\/p>\n<p>Any number of letters at the end or the beginning of the word are replaced by a symbol, most often by * (asterisk) or ? (question mark).<\/p>\n<p><strong>Example:\u00a0<\/strong><br>\n<strong><em>question*<\/em><\/strong>\u00a0\u2013 retrieves\u00a0<em>questions<\/em>,\u00a0<em>questioning<\/em>, etc.<br>\n<strong><em>child*\u00a0<\/em><\/strong>\u2013 retrieves\u00a0<em>children<\/em>,\u00a0<em>childhood<\/em>, etc.<\/p>\n<p>This search can replace the connecting of different word forms with OR.<\/p>\n<p>First, decide where it is most practical to interrupt the word to replace its ending by a symbol\/meta-sign. If you interrupt the word too early, you may get too many irrelevant results, but if you do it too late, you may miss some important words (<em>adolescent*\u00a0<\/em>\u2013 retrieves\u00a0<em>adolescents<\/em>, but not\u00a0<em>adolescence<\/em>;\u00a0<em>teacher*\u00a0<\/em>\u2013 misses\u00a0<em>teaching<\/em>).<\/p>\n<p>You can also use a symbol instead of a letter <strong>inside a word<\/strong> in case different spellings are possible or if you are not sure of the spelling, or if you want to find all possible spellings of the word.<\/p>\n<p><strong>Example:<\/strong><br>\n<strong><em>organi?ation<\/em>\u00a0<\/strong>\u2013 both\u00a0<em>organization<\/em>\u00a0and\u00a0<em>organisation<\/em>\u00a0are found; \u00a0<em id=\"__mceDel\" style=\"line-height: 1.6em;\">\u00a0<strong><em>wom?n<\/em><\/strong>\u00a0\u2013 both\u00a0<em>woman<\/em>\u00a0and\u00a0<em>women<\/em>\u00a0are found<\/em><\/p>\n<p>The use of these symbols may differ in different databases, be sure to find out about their use before making a search.<\/p>\n<h5><span style=\"color: #3a58c5; font-size: medium;\" data-mce-mark=\"1\">Use on parentheses<\/span><\/h5>\n<p>If you use different operators in one and the same query, you have to keep in view that the expressions connected with AND and NOT are searched first, and those connected with OR, only in the second order. If you wish to change this order, you have to use parentheses. The expressions in parentheses are searched first.<\/p>\n<p>Example: using the table of search words above, we connect synonyms and words of similar meaning with the operator OR, separate these groups with parentheses and then connect them with the operator AND in order to find their intersection. We use truncation to avoid spelling out all words with similar stems.<\/p>\n<table class=\"table table-hover\" style=\"background-color: #e6e6fa; width: 652px; height: 71px;\" border=\"0\" align=\"left\">\n<tbody>\n<tr>\n<td><span data-mce-mark=\"1\"><strong><em>(aggressi*\u00a0OR violen*) AND (tv OR television) AND (child* OR adolescen* OR teen*)\u00a0<\/em><\/strong><\/span><span data-mce-mark=\"1\"><strong><em>\u00a0<\/em><\/strong><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><em>\u00a0<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The most essential factor in formulating a query is the skilful combining of search words and using different techniques in order to formulate the subject as clearly and precisely as possible. The search words can be combined using the following &#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-4","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/sisu.ut.ee\/principles\/wp-json\/wp\/v2\/pages\/4","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sisu.ut.ee\/principles\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sisu.ut.ee\/principles\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sisu.ut.ee\/principles\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/sisu.ut.ee\/principles\/wp-json\/wp\/v2\/comments?post=4"}],"version-history":[{"count":3,"href":"https:\/\/sisu.ut.ee\/principles\/wp-json\/wp\/v2\/pages\/4\/revisions"}],"predecessor-version":[{"id":65,"href":"https:\/\/sisu.ut.ee\/principles\/wp-json\/wp\/v2\/pages\/4\/revisions\/65"}],"wp:attachment":[{"href":"https:\/\/sisu.ut.ee\/principles\/wp-json\/wp\/v2\/media?parent=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}