Jump to: navigation, search

Difference between revisions of "Mobile Free Text Search"


(Property names)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
On {{UBIK}} Android, you have the possibility to search for objects by free text input ({{Version/AndroidSince|2.4.5}}).
+
On {{UBIK}} Android, you have the possibility to search for objects by free text input. {{Version/AndroidSince|2.4.5}}
  
 
== The search action item ==
 
== The search action item ==
Line 66: Line 66:
 
{{Hint|If you by mistake specify the name of a meta property as part of your search text, your results may be filtered in a not desired manner. If you don't find a result, therefore try to consider this.}}
 
{{Hint|If you by mistake specify the name of a meta property as part of your search text, your results may be filtered in a not desired manner. If you don't find a result, therefore try to consider this.}}
  
[[Category:Android|Mobile Free Text Search]]
+
 
  
 
=== Numbers ===
 
=== Numbers ===
Line 77: Line 77:
  
 
==== Input format ====
 
==== Input format ====
 
+
All around the world, people tend to write dates and times in all different manners imaginable. Our free text search uses one simple 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:  
+
 
+
 
{{Code|Year-Month-Day Hour:Minute:Second}}
 
{{Code|Year-Month-Day Hour:Minute:Second}}
  
 
Example:
 
Example:
 
 
{{Code|2015-05-27 20:46:21}}
 
{{Code|2015-05-27 20:46:21}}
  
Line 96: Line 92:
  
 
{{Hint|For all time criteria, the local time zone is taken into account.}}
 
{{Hint|For all time criteria, the local time zone is taken into account.}}
 
  
  

Latest revision as of 13:02, 23 August 2017

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

The search action item

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 action item is only available after login.

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 and online or manual mode are active (not available in offline mode); see Sync Mode for more details.
  • 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.

Examples:

  • Pressure 32.8 - Will find objects having a property "Pressure" with the value 32.8.
  • "Pump inspection" 2015-05-27 - Will find objects named "Pump inspection" with date property values anywhere on the May 27th, 2015.
  • "Fault notification" "2015-5-27 7:35" - Will find objects named "Fault notification" with date values between 7:35:00 and 7:35:59 o'clock on May 27th, 2015.
  • 7:00 - Will find objects having a date value between 07:00 and 07:59 o'clock on the current day.


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 belonging together 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").

What does this mean? For example, let's say we have an object named "Mount", another one named "Everest" and a third one named "Mount Everest". If you search for Mount Everest, all three objects will be found. If you search for "Mount Everest" instead, only the last object (with a name containing the whole phrase) is found.

IC Hint square.pngYou might want to use quotation to search for whole phrases in order to get a more accurate result.

Property names

If a meta property is found that matches a criterion, all found property values are filtered by it. This way, you can specify your search efficiently.

For example, imagine searching for a value like "2". It will be found extremely often, so without further specification, you will get all kinds of results. Adding the meta property name "Layer ID" will result in a way better result.

The query then looks like the following: "Layer ID" 2

IC Hint square.pngSpecify meta property names in order to filter your search for property values!
IC Hint square.pngIf you by mistake specify the name of a meta property as part of your search text, your results may be filtered in a not desired manner. If you don't find a result, therefore try to consider this.


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.

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 uses one simple format: 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 or the days (the latter is valid for date-only arguments). In a more precise manner, the supported formats are:

  • [y-M[-d]]
  • [y-M-d] [H:m[:s]]
IC Hint square.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.
IC Hint square.pngFor all time criteria, the local time zone is taken into account.


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.

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).