Using Mojo search engine

Mojo provides a very powerful search engine. Here are a few tips to take advantage of it. Mojo searches the title and description of the ticket including custom fields and ticket comments. Search performs an *exact lookup* unless a `wildcard` symbol such as `*` or `?` is used. ### Wild card searches Examples: * Searching for `serv*s` will match both `servers` and `services`. * Searching `*123` will match `xyz123`. * Searching `inv?te` will match `invite` but not `invente`. * Searching for `abc` will match only exact word `abc`. ### Proximity searches Mojo supports finding words are a within a specific distance away. To do a proximity search use the tilde, `~`, symbol at the end of a Phrase. #### Examples * `"mojo users"~10` searches for a "mojo" and "users" within 10 words of each other. ### Boolean Operators Boolean operators allow terms to be combined through logic operators. Mojo supports `AND`, `+`, `OR`, `NOT` and `-` as Boolean operators (Note: **Boolean operators must be ALL CAPS**). ### OR operator The `OR` operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the`OR` operator is used. The `OR` operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. The symbol `||` can be used in place of the word `OR`. To search for documents that contain either "mojo apache" or just "mojo" use the query: "mojo apache" mojo or "mojo apache" OR mojo ### AND operator The `AND` operator matches documents where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. The symbol `&&` can be used in place of the word `AND`. To search for documents that contain "mojo apache" and "Apache Lucene" use the query: "mojo apache" AND "Apache Lucene" ### + operator The `+` or required operator requires that the term after the `+` symbol exist somewhere in a the field of a single document. To search for documents that must contain "mojo" and may contain "lucene" use the query: +mojo lucene ### NOT operator The `NOT` operator excludes documents that contain the term after `NOT`. This is equivalent to a difference using sets. The symbol `!` can be used in place of the word `NOT`. To search for documents that contain "mojo apache" but not "Apache Lucene" use the query: "mojo apache" NOT "Apache Lucene" Note: The NOT operator cannot be used with just one term. For example, the following search will return no results: NOT "mojo apache" ### - operator The `-` or prohibit operator excludes documents that contain the term after the `- symbol. To search for documents that contain "mojo apache" but not "Apache Lucene" use the query: "mojo apache" -"Apache Lucene" ### Grouping Mojo supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query. To search for either "mojo" or "apache" and "website" use the query: (mojo OR apache) AND website This eliminates any confusion and makes sure you that website must exist and either term mojo or apache may exist.
Published on: 2013-09-23 See other articles in Search FAQ, Troubleshooting.