Archives For full text search

Editor’s Note: Earlier this week we did a blog post around the new FTS engine introduced in Sugar 6.5 Pro and above, talking about how to get it all setup and running. Today, Sugar Engineer Jimmy Chen details a few tips and examples to best use the tool to enable easier searching.

Here are some tricks and examples that may help users using the full text search that is new to Sugar 6.5 Pro and above.

Type ahead: When full text search is enabled. The search box has autocomplete turned on to support typeahead. When you enter 3+ characters, the search begins and shows matches in a box.

Wildcard match: When you enter 3+ characters to search without hitting the enter or return key, or without clicking on the search button. Sugar automatically adds a wildcard to your search string. For example, when you type in pacific, both pacific and pacifica will be returned.

Exact match: When you hit enter or return key, or when you click on the search button, then no wildcard is appended to the search string. For example, if you enter pacific followed by an enter key, only pacific, and not pacifica, will be returned.

AND: When you enter multiple words to search, search engine uses OR operator by default. For example, if you enter “abc xyz” (w/o quotes), all documents that contain either abc or xyz or both, will be returned. If you only want to search for the documents that contain both abc and xyz, you can use “abc AND xyz” (w/o quotes). AND needs to be uppercase. That will give you “abc def xyz”, or “xyz abc”, but not “abc” or “xyz”.

Double quotes: When you enter multiple words to search, you can use double quotes to search them as a term. For example, enter “abc xyz” (with quotes) will return only “abc xyz”, but not “xyz abc”, “abc” or “xyz”.