Jump to: navigation, search

Mobile Free Text Search


Revision as of 19:03, 27 May 2015 by NWE (Talk | contribs) (Text (Strings))

On UBIK® Android, you have the possibility to search for objects by free text input.

The search action item

In most activities' action bars (except for not directly content-related ones like the info activity or the settings activity), a search action item in form of a magnifying glass icon is available.

Pressing it results into the action bar changing to a search text input field. Here, you can enter your free text criteria you want to search for. Upon confirming the input, a search result activity will open, and the search will run in the background.

The search result activity

After having started the search, a result activity will be shown. If results are found, they are shown in a list, sorted by relevance and alphabetically. Clicking on such a result object will show it in the content browser.

Online and offline search

A mobile free text search is always performed based on data available on the device. Additionally, an online server search is executed if possible.

The requirements for an online search are:

  • The server is reachable
  • A free text search query is provided by the server

Search result quality

The estimated quality of the search result (and each object's order in the result list) depends on how many search criteria you entered were found for an object. E.g., if two out of two criteria were matched successfully, the respective object is regarded a "full match". If only part of the criteria were found, it is a "partial match". Every object coming from the server is of unknown quality. Therefore, full matches are shown first, then come objects received from the server and finally the partial matches.

Search criteria

The text you provide in the input field is processed into search criteria objects before actually executing the search. An understanding of this mechanism and how to write a search query that is comprehensive for it will benefit your ability to find objects.

Individual words and connected phrases

The search text interpreter will try to split up your query into words that are separated by a blank character (' '). Every word counts as a separate criterion. E.g., the query {Hello, Bob} will result in a search for the criteria "Hello" and "Bob", independently.

But what if I want to search for something that contains a space character, e.g. "2015-05-27 20:34" or "Layer IV"? In this case, wrap your connected phrase into quotation marks (") - the search text interpreter will handle it as a single criterion. Example: {Chuck "He who needs no nickname" Norris} will result into three criteria (one of them being the phrase "He who needs no nickname").

Dates and times

Input format

All around the world, people tend to write dates and times in all different manners imaginable. Our free text search is not intelligent enough to recognize them all though. Therefore, one simple format is provided:

Year-Month-Day Hour:Minute:Second

Example: 2015-05-27 20:46:21

You can also specify date only or time only. Also, you do not need to provide the seconds. In a more precise manner, the format is:

[y-M-d] [H:m[:s]]

IC Attention.pngIf you want to search for a date and a time (in one criterion), then make sure you put the date-time into quotes (")! Else, the date and the time will be searched for separately - possibly decreasing the result quality.

Search behaviour

If you specify a search date, you probably don't mean a moment in time exactly that millisecond, but rather something like "on that day" or "during this hour". Therefore, the free text search will always search for the time span you didn't specify concretely. E.g., if you search for "2015-05-27", every result containing dates for this day will be found.

Also, a pure text search for your input will be done additionally. By the way, this means that you also can specify dates the way your UBIK objects do, because it might match at text-level even without the search understanding your date input.

Numbers

Numbers can be entered depending on your locale (e.g. using a comma instead of a point for the decimal separator). Your device must be configured for that locale though, or the search will assume your locale and culture wrong.

However, all numeric input is also searched for as pure text.

Boolean values

The search recognizes the words "True" and "False" as boolean values. A pure text search is done as well.

Text (Strings)

All text input is also searched for without modification. This includes occurences of a text in a Geo specification (lat/long/alt).

The only thing you can't search for currently are UUID/Guid criteria (but you probably don't want to enter one by hand anyway).