How search works in DeskDirector products

Jason He Updated by Jason He

In all products DeskDirector has created, we use full-text search for all list interface. Different to traditional contains or start with approach, full-text search provide flexibility that traditional approach cannot compete. It is also not perfect, it has trade off.

More info regarding to this technology you can check out wikipedia page.

How index and tokenization works?

For each collection, we will mark few property as query fields. Information within will be tokenized and indexed by database. Different to traditional database, full-text search requires break down information into tokens. When search, we are search on tokens instead of sentence.

Basic tokenization for English is split information by space, special chars and new lines. All tokens are case insensitive.

The quick brown fox jumped over the lazy dogs, Bob@hotmail.com 123432.

Above sentence will produce following tokens.

[quick] [brown] [fox] [jumped] [over] [lazy] [dog] [bob@hotmail.com] [123432]

How is system determine most matched object?

When system analyze search terms, it will tokenize search string. It will match on two different criteria. The highest rating will be returned at start.

  1. Any token that's exactly match will give rating of 2
  2. Any token that's start with search term will give rating of 1.
  3. Repeat match will increase it's total rating.

For example, we have two user with following name.

  1. Jamison Knight / jknight@example.com from Euro Health Center
  2. Jamison Coon / jamison@secondcompany.com from Europtimum

Scenario:

Search term: Euro Jamison will give 4 rating for Jamison Knight and 3 rating for Jamison Coon. Since Jamison Coon only has start with match with Europtimum, while Jasmison Knight has exactly match with Euro.

What kind of terms we can use for different collection?

DeskDirector has put a lot of effort to analyze the important fields that should be included inside index. I will summarize them below.

  • Company / Account: name, identifier
  • Contact: first name, last name, primary email, secondary emails, title, email domain.
  • Member / Resource: first name, last name, primary email, secondary emails, identifier
  • Ticket: tittle, initial description, identifier

FAQs

1. How many terms can we include in search?

Same as many other full-text search implementation. You can include as many terms as you like to. You can event type in sentence.

2. Why cannot we add sorting to search result?

Without search, sorting is allowed. With search, sorting will only create confusion. For example, if sort result by text, then higher rating result could end up on page 2 or 4.

That is the reason why full-text search never allow ordering. e.g. Google

3. When I search contact, there could be result from different companies. How do I improve accuracy?

You can add email as addition to existing search term, you can also add company filter. That way, only contact from that company will be returned.

4. How come there are many false-positives?

Full-text searching is likely to retrieve many documents that are not relevant to the intended search question. Such documents are called false positives. They often appear at end of search results, where they are partially matched with search terms.

How did we do?

Finding out what server your DeskDirector instance is on.

Contact