Jump to: navigation, search

Difference between revisions of "Mobile Free Text Search"


(Created page with " On {{UBIK}} Android, you have the possibility to search for objects by free text input. {{Version/AndroidSince|2.4.5}} == The search action item == In most activities' acti...")
 
 
(36 intermediate revisions by 3 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 ==
 +
[[File:Action_icon_search.png|thumb|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.
+
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.
 
+
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 ==
 
== 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]].
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 ==
 
== 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.  
 
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 requirements for an online search are:
* The server is reachable
+
* 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  
+
* A free text search query is provided by the server
  
 
== Search result quality ==
 
== Search result quality ==
Line 33: Line 28:
 
An understanding of this mechanism and how to write a search query that is comprehensive for it will benefit your ability to find objects.
 
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 ===
+
Examples:
  
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.
+
* {{Code|Pressure 32.8}} - Will find objects having a property "Pressure" with the value 32.8.
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"?
+
* {{Code|"Pump inspection" 2015-05-27}} - Will find objects named "Pump inspection" with date property values anywhere on the May 27th, 2015.
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 ===
+
* {{Code|"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.
  
==== Input format ====
+
* {{Code|7:00}} - Will find objects having a date value between 07:00 and 07:59 o'clock on the current day.
  
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
+
=== Individual words and connected phrases ===
  
Example: 2015-05-27 20:46:21
+
The search text interpreter will try to split up your query into words that are separated by a blank character ({{Code| }}). Every word counts as a separate criterion.
 +
E.g., the query {{Code|Hello, Bob}} will result in a search for the criteria "Hello," and "Bob", independently.
  
You can also specify date only or time only. Also, you do not need to provide the seconds.
+
But what if I want to search for something belonging together that contains a space character, e.g. {{Code|2015-05-27 20:34}} or {{Code|Layer IV}}?
In a more precise manner, the format is:  
+
In this case, wrap your connected phrase into quotation marks ({{Code|"}}) - the search text interpreter will handle it as a single criterion.
 +
Example: {{Code|Chuck "He who needs no nickname" Norris}} will result into three criteria (one of them being the phrase "He who needs no nickname").
  
[y-M-d] [H:m[:s]]
+
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 {{Code|Mount Everest}}, all three objects will be found. If you search for {{Code|"Mount Everest"}} instead, only the last object (with a name containing the whole phrase) is found.
  
{{Attention|If 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.}}
+
{{Hint|You might want to use quotation to search for whole phrases in order to get a more accurate result.}}
  
==== Search behaviour ====
+
=== 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:
 +
{{Code|"Layer ID" 2}}
 +
{{Hint|Specify meta property names in order to filter your search for property values!}}
 +
{{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.}}
  
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 ===
Line 73: Line 73:
  
 
However, all numeric input is also searched for as pure text.
 
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:
 +
{{Code|Year-Month-Day Hour:Minute:Second}}
 +
 +
Example:
 +
{{Code|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:
 +
 +
* {{Code|[y-M[-d]]}}
 +
* {{Code|[y-M-d] [H:m[:s]]}}
 +
 +
{{Hint|If 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.}}
 +
 +
{{Hint|For 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 {{Code|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 ===
 
=== Boolean values ===
Line 81: Line 110:
 
=== Text (Strings) ===
 
=== Text (Strings) ===
  
All text input is also searched for without modification as well. This includes occurences of a text in a Geo specification (lat/long/alt).
+
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).
 
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).
  
 
[[Category:Android|Mobile Free Text Search]]
 
[[Category:Android|Mobile Free Text Search]]
[[Category:Search|Mobile Free Text Search]]
 

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