> For the complete documentation index, see [llms.txt](https://dev.pointr.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.pointr.tech/v9/features/indoor-maps/search.md).

# Search&#x20;

Learn how our default search engine works for Point of Interest (POI) content in both mobile and web SDKs.

{% tabs %}
{% tab title="v9.9.0 onwards" %}

### Ranking Criteria

The POI search algorithm ranks matches through a layered pipeline that uses both textual relevance and proximity. Each POI is scored against the query using a set of predicates organized into three tiers:

* Best matches (exact title, title starts with query, whole-word match, type, keywords)
* Good matches (partial title, word prefix, tags)
* Weak matches (fuzzy title with typo tolerance, description).

A match from a higher tier always ranks above any match from a lower tier, so distance never overrides relevance across tiers. Within a tier, results are ordered by estimated walking time when the user's location is known (accounting for real walkable paths, floor transitions, and walking speed), or alphabetically otherwise.

POIs sharing a name and type are grouped together, with the closest member determining the group's position.

<figure><img src="https://2585032735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjgeYeKrK9Emf57ofXXap%2Fuploads%2FHKGHFXyunAQLsJDIAOTV%2FSmarter%2C%20Location-Aware%20Search%20for%20Mobile%20(1).png?alt=media&amp;token=a3bff835-c0a1-4bd2-9133-d58a41b41f16" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Previous Versions" %}

### Ranking Criteria

*Our default POI Search Algorithm ranks the queries as below (in descending priority):*

1. Title exact match with query
2. Title starts with query
3. Title words start with query
4. Title contains contents of query ([Fuzzy Search](#fuzzy-search-for-titles))
5. Keywords contain text of query
6. Description contains text of query
7. Type contains text of query

### Sorting&#x20;

*Same priority matches are sorted:*

* by approximate distance, **IF location is available**
* alphabetically based on title, **IF location is unavailable**

{% hint style="info" %}
**Distance** is given by **estimated time of arrival** and is calculated taking into account **transitions** and **walking speed** of a person.
{% endhint %}

### Normalization

The input to search, and the strings that are searched against (titles, descriptions, keywords, etc) are normalized.

<details>

<summary>Translation of Accent Characters</summary>

```
'à' => "a", 'á' => "a", 'â' => "a", 'ä' => "a", 'æ' => "a", 'ã' => "a", 'å' => "a", 'ā' => "a",
'À' => "a", 'Á' => "a", 'Â' => "a", 'Ä' => "a", 'Æ' => "a", 'Ã' => "a", 'Å' => "a", 'Ā' => "a",
'ç' => "c", 'ć' => "c", 'č' => "c", 'Ç' => "c", 'Ć' => "c", 'Č' => "c", 'è' => "e", 'é' => "e",
'ê' => "e", 'ë' => "e", 'ē' => "e", 'ė' => "e", 'ę' => "e", 'È' => "e", 'É' => "e", 'Ê' => "e",
'Ë' => "e", 'Ē' => "e", 'Ė' => "e", 'Ę' => "e", 'î' => "i", 'ï' => "i", 'í' => "i", 'ī' => "i",
'į' => "i", 'ì' => "i", 'ı' => "i", 'Î' => "i", 'Ï' => "i", 'Í' => "i", 'Ī' => "i", 'Į' => "i",
'Ì' => "i", 'I' => "i", 'ł' => "l", 'Ł' => "l", 'ñ' => "n", 'ń' => "n", 'Ñ' => "n", 'Ń' => "n",
'ô' => "o", 'ö' => "o", 'ò' => "o", 'ó' => "o", 'œ' => "o", 'ø' => "o", 'ō' => "o", 'õ' => "o",
'Ô' => "o", 'Ö' => "o", 'Ò' => "o", 'Ó' => "o", 'Œ' => "o", 'Ø' => "o", 'Ō' => "o", 'Õ' => "o",
'ß' => "s", 'ś' => "s", 'š' => "s", 'Ś' => "s", 'Š' => "s", 'û' => "u", 'ü' => "u", 'ù' => "u",
'ú' => "u", 'ū' => "u", 'Û' => "u", 'Ü' => "u", 'Ù' => "u", 'U' => "u", 'Ū' => "u", 'ÿ' => "y",
'Ÿ' => "y", 'ž' => "z", 'ź' => "z", 'ž' => "z", 'Ž' => "z", 'Ź' => "z", 'Ż' => "z", 'ğ' => "g",
'Ğ' => "g", '&' => " and ", '¿' => "?"
```

</details>

* Symbols are removed except `{ + - ! ? < > : " ( ) * { } [ ] % ^ @ $`.
* Alphanumeric characters are converted to lowercase.
* Multiple whitespaces are converted to single whitespace.
* Non-latin characters are kept as is.

### Fuzzy Search for Titles

Fuzzy search is only carried out when the titles of POIs contain the contents (i.e. characters) from the query string.&#x20;

| Example results for the search term "Res":                                                                                                                                                                                                                                                                |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <div><figure><img src="https://2585032735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjgeYeKrK9Emf57ofXXap%2Fuploads%2FjZbuwD0Gssmo92I7EPb1%2FRectangle.png?alt=media&amp;token=38388f4c-064e-4035-9e5e-e2051612998d" alt="" width="375"><figcaption></figcaption></figure></div> |

{% hint style="info" %}
Default search does not calculate the string distance between the query strings and all the title/description/keyword/type pairs.
{% endhint %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://dev.pointr.tech/v9/features/indoor-maps/search.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
