{"_id":"576a7159ca8984220080d03f","__v":5,"githubsync":"","user":"55dd6b48a649eb170083b97a","version":{"_id":"56439dff9eebf70d00490d57","project":"56439dfe9eebf70d00490d54","__v":26,"createdAt":"2015-11-11T19:58:55.144Z","releaseDate":"2015-11-11T19:58:55.144Z","categories":["56439dff9eebf70d00490d58","56439e17c92c470d002dec71","564ce88e802cd02100444274","564d07ff3657c43500bf1d33","564d0a312da1982d00b19b64","564d2aa92da1982d00b19b8c","564d30a8b88a37210082253e","564d362c2da1982d00b19ba0","569d664371e3650d00acf018","569d7eacec29360d00f667c9","569d8006ec29360d00f667cb","569d855e0306a10d00ce99b9","569d91d571e3650d00acf04c","569d91eeceb7510d00f2a6a3","569e8c262d320817003b806d","569e8f802d320817003b8072","56b038c914dfea0d0007cf05","5717b4f0681bb41900fc575a","5718e0a4cd483219007c2c9a","571924c8e967cb1700d078e9","571e2648edc4a92b00a4cc65","576a677a6f15260e001f899b","576c5eaf5738570e00ff070f","578d127ed9c55c2000d4f213","579f90927ebe9b0e00059c50","582c0af888708a0f00570a69"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":false,"codename":"","version_clean":"1.0.0","version":"1"},"category":{"_id":"576a677a6f15260e001f899b","project":"56439dfe9eebf70d00490d54","version":"56439dff9eebf70d00490d57","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-06-22T10:24:58.776Z","from_sync":false,"order":18,"slug":"new-search-api","title":"New Search API"},"parentDoc":null,"project":"56439dfe9eebf70d00490d54","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-22T11:07:05.411Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"As default AND operator applied for all the empty space between the query, for example if we \nsearch for “Water Power” internally it will converted as “Water AND Power”  by search query processor.\n\nGooru removes stop-words from the index. However, stop words are not removed from the query, which means “ocean” and “The ocean” will return slightly different results.  \n\nSearch query term supports following patterns:\n  * Logical expression query\n  * Resource format filter query\n  * Prefix filter query \n  * Standard code query \n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Logical Expression Query\"\n}\n[/block]\nSearch query supports logical operators (AND, OR). If we pass AND and OR between search strings, query processor will take this query string as logical expression query. Only uppercase AND and OR considered as logical query operators.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"greek OR latin\",\n    \"h-0\": \"Query\",\n    \"h-1\": \"Results\",\n    \"0-1\": \"results matched with either greek or latin\",\n    \"1-0\": \"greek or latin\",\n    \"2-0\": \"greek AND latin\",\n    \"3-0\": \"greek latin\",\n    \"4-0\": \"(greek OR latin) AND (science OR math)\",\n    \"5-0\": \"\",\n    \"1-1\": \"results matched with “greek or latin”\",\n    \"2-1\": \"results matched with both greek and latin\",\n    \"3-1\": \"Same as greek AND latin. results matched with both greek and latin\",\n    \"4-1\": \"results matched with greek or latin  and science or math\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Resource Format Filter Query\"\n}\n[/block]\nResource format (webpage, video, text, image) string passed with query will be applied as resource format filter.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"power video\",\n    \"h-0\": \"Query\",\n    \"h-1\": \"Results\",\n    \"0-1\": \"Results filtered by **video** resource format\",\n    \"1-0\": \"atoms webpage\",\n    \"1-1\": \"Results filtered by **webpage** resource format\",\n    \"2-0\": \"water text\",\n    \"3-0\": \"ocean image\",\n    \"2-1\": \"Results filtered by **text** resource format\",\n    \"3-1\": \"Results filtered by **image** resource format\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Prefix Filter Query\"\n}\n[/block]\nIf filter name is prefixed with search query and passed with colon (ie. grade:12) then it will be considered as filter.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"ocean grade:6,7\",\n    \"h-0\": \"Query\",\n    \"h-1\": \"Results\",\n    \"1-0\": \"publisher:”Windows to the Universe”\",\n    \"2-0\": \"aggregator:CLRN\",\n    \"0-1\": \"Results filtered by grade value 6, 7\",\n    \"1-1\": \"Results filtered by publisher value Windows to the Universe\",\n    \"2-1\": \"Results filtered by aggregator value CLRN\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]","excerpt":"","slug":"query-syntax","type":"basic","title":"Query Syntax"}
As default AND operator applied for all the empty space between the query, for example if we search for “Water Power” internally it will converted as “Water AND Power” by search query processor. Gooru removes stop-words from the index. However, stop words are not removed from the query, which means “ocean” and “The ocean” will return slightly different results. Search query term supports following patterns: * Logical expression query * Resource format filter query * Prefix filter query * Standard code query [block:api-header] { "type": "basic", "title": "Logical Expression Query" } [/block] Search query supports logical operators (AND, OR). If we pass AND and OR between search strings, query processor will take this query string as logical expression query. Only uppercase AND and OR considered as logical query operators. [block:parameters] { "data": { "0-0": "greek OR latin", "h-0": "Query", "h-1": "Results", "0-1": "results matched with either greek or latin", "1-0": "greek or latin", "2-0": "greek AND latin", "3-0": "greek latin", "4-0": "(greek OR latin) AND (science OR math)", "5-0": "", "1-1": "results matched with “greek or latin”", "2-1": "results matched with both greek and latin", "3-1": "Same as greek AND latin. results matched with both greek and latin", "4-1": "results matched with greek or latin and science or math" }, "cols": 2, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Resource Format Filter Query" } [/block] Resource format (webpage, video, text, image) string passed with query will be applied as resource format filter. [block:parameters] { "data": { "0-0": "power video", "h-0": "Query", "h-1": "Results", "0-1": "Results filtered by **video** resource format", "1-0": "atoms webpage", "1-1": "Results filtered by **webpage** resource format", "2-0": "water text", "3-0": "ocean image", "2-1": "Results filtered by **text** resource format", "3-1": "Results filtered by **image** resource format" }, "cols": 2, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Prefix Filter Query" } [/block] If filter name is prefixed with search query and passed with colon (ie. grade:12) then it will be considered as filter. [block:parameters] { "data": { "0-0": "ocean grade:6,7", "h-0": "Query", "h-1": "Results", "1-0": "publisher:”Windows to the Universe”", "2-0": "aggregator:CLRN", "0-1": "Results filtered by grade value 6, 7", "1-1": "Results filtered by publisher value Windows to the Universe", "2-1": "Results filtered by aggregator value CLRN" }, "cols": 2, "rows": 3 } [/block]