> For a complete page index of the Captain API documentation, fetch https://docs.captain.dev/llms.txt?excludeSpec=true

# What gets imported

> How an Algolia index's products, settings, synonyms and merchandising rules map into a Captain catalog.

Every Algolia setting, synonym type and rule gets one of three results: mapped, approximated or not mapped.

**You'll need:** an import that has finished, or an Algolia index you're planning to import.

| Result       | Meaning                                                    |
| ------------ | ---------------------------------------------------------- |
| Mapped       | Captain does the same thing.                               |
| Approximated | Captain does something close. The notes below say how.     |
| Not mapped   | Captain has no equivalent yet, so the setting is left out. |

The console's summary lists the synonyms and rules that didn't come over. The full report, one row per setting, synonym type and rule with its reason, is at `GET /v1/indexes/{index}/import/report` and needs an admin key. Ask Captain support for it if you don't have one.

## Products

* `objectID` becomes the product's ID.
* The first searchable attribute that holds short text becomes the title. Attributes named like `brand`, `category` and `description` keep that role.
* `hierarchicalCategories.lvl0`, `lvl1` and so on, or a list of categories, become the category path.
* Nested objects are flattened to dotted field names, for example `price.value`.
* Algolia's response-only fields (`_highlightResult`, `_snippetResult`, `_rankingInfo`) are dropped.

## Search settings

| Algolia setting                                                                                                                                                                                                      | Result                                   | Notes                                                                                                                                                                |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `attributesForFaceting`                                                                                                                                                                                              | Mapped                                   | Becomes the catalog's facets. `filterOnly(x)` on a number becomes a numeric filter.                                                                                  |
| `numericAttributesForFiltering`                                                                                                                                                                                      | Mapped                                   |                                                                                                                                                                      |
| `typoTolerance`, `minWordSizefor1Typo`, `minWordSizefor2Typos`                                                                                                                                                       | Mapped                                   | Same defaults as Algolia: 1 typo from 4 letters, 2 from 8.                                                                                                           |
| `ignorePlurals`                                                                                                                                                                                                      | Mapped                                   | Stemming covers plurals.                                                                                                                                             |
| `hitsPerPage`, `paginationLimitedTo`, `maxValuesPerFacet`                                                                                                                                                            | Mapped                                   |                                                                                                                                                                      |
| `attributesToRetrieve`, `attributesToHighlight`, `highlightPreTag`, `highlightPostTag`, `responseFields`                                                                                                             | Mapped                                   |                                                                                                                                                                      |
| `enableRules`                                                                                                                                                                                                        | Mapped                                   |                                                                                                                                                                      |
| `searchableAttributes`                                                                                                                                                                                               | Approximated                             | Captain searches fixed fields (title, category, brand, attributes, description) with its own weights. The order within a field and `unordered()` are not reproduced. |
| `customRanking`                                                                                                                                                                                                      | Approximated                             | Captain ranks by relevance. The attributes are kept as typed fields for sorting and boosts.                                                                          |
| `ranking`                                                                                                                                                                                                            | Approximated                             | Algolia's tie-break order is not reproduced.                                                                                                                         |
| `removeStopWords`                                                                                                                                                                                                    | Approximated                             | Captain's own English stop words.                                                                                                                                    |
| `queryLanguages`, `indexLanguages`                                                                                                                                                                                   | Approximated                             | English analysis only.                                                                                                                                               |
| `optionalWords`, `removeWordsIfNoResults`                                                                                                                                                                            | Approximated                             | No Captain search requires every word.                                                                                                                               |
| `decompoundQuery`                                                                                                                                                                                                    | Approximated                             | Hyphens, and words joined or split, only.                                                                                                                            |
| `allowTyposOnNumericTokens`                                                                                                                                                                                          | Approximated                             | Numbers and codes are matched exactly, never corrected.                                                                                                              |
| `replicas`                                                                                                                                                                                                           | Not mapped                               | Sorted copies of an index aren't built.                                                                                                                              |
| `distinct`, `attributeForDistinct`                                                                                                                                                                                   | Not mapped                               | Variant grouping isn't built yet.                                                                                                                                    |
| `enablePersonalization`                                                                                                                                                                                              | Not mapped                               |                                                                                                                                                                      |
| `renderingContent`                                                                                                                                                                                                   | Mapped when it holds only facet ordering | Facet ordering becomes the catalog's facet order. Anything else in it, such as redirects and widgets, is left out, and the row is then approximated.                 |
| `advancedSyntax`, `disableTypoToleranceOnWords`, `disableTypoToleranceOnAttributes`, `unretrievableAttributes`, `relevancyStrictness`, `separatorsToIndex`, `camelCaseAttributes`, `attributesToSnippet`, `userData` | Not mapped                               |                                                                                                                                                                      |

A setting with a value that isn't in this table is reported as not mapped. A setting with no value is reported as not used.

## Synonyms

| Algolia type                       | Result                                                              |
| ---------------------------------- | ------------------------------------------------------------------- |
| `synonym` (two-way)                | Mapped                                                              |
| `oneWaySynonym`                    | Mapped                                                              |
| `altCorrection1`, `altCorrection2` | Approximated: they become one-way synonyms, without a typo penalty. |
| `placeholder`                      | Not mapped                                                          |

## Merchandising rules

| Algolia rule part                                                                                    | Result                             |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------- |
| Query pattern with `is`, `startsWith`, `endsWith` or `contains`                                      | Mapped                             |
| `promote` (pins) and `hide`                                                                          | Mapped                             |
| `params.filters`                                                                                     | Mapped                             |
| `optionalFilters`                                                                                    | Approximated: they become a boost. |
| `userData`, facet ordering in `renderingContent`, and a context condition                            | Mapped                             |
| Query edits, `automaticFacetFilters`, redirects and widgets in `renderingContent`, condition filters | Not mapped                         |

* Captain skips a disabled rule, and a rule whose validity windows have all ended.
* A rule with a current or future validity window is imported without the window, so it applies all the time. Check scheduled rules, such as a holiday promotion, after the import.