# Synonyms

{% hint style="warning" %}
Synonyms **only work with Custom Post Type** results: Posts, Pages, Products, Media Attachments etc... Taxonomy terms, user and other type of results are currently not supported!
{% endhint %}

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

To use synonyms, the index table engine is required. Before you start with this tutorial, I highly suggest reading up the [introduction to the index table](https://documentation.ajaxsearchpro.com/index-table).

The synonyms interface can be accessed on the **Index Table** submenu, under the *Synonyms* panel.

![Synonyms menu access](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQ8aLsmzXHoMVMWvj7%2F-LBQAGf31cC8ar7_ayXj%2Fimage.png?alt=media\&token=47dc8c07-c9b2-42e9-8302-a38771d106b9)

## Managing Synonyms

{% hint style="info" %}
**After** making changes (adding/removing) to the synonyms, the index table must be re-created, by clicking on the **Create new index** option, otherwise it has no effect.
{% endhint %}

![Make sure to create a new index, after adding/changing the synonyms](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQbc29CxlfpkBUnLdR%2F-LBQg_AL0tZAMfMzyy0W%2Fimage.png?alt=media\&token=e8795cef-da02-44b1-89d5-1071595d5d16)

### Adding new synonym

To add a new synonym, simply click on the **+Add new** button on the top of the panel. Enter the desired original word and the synonyms (max. 15), then hit the **Save** button.

![Synonym editor window](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQbc29CxlfpkBUnLdR%2F-LBQdEnj0j87DVkEeUIP%2Fimage.png?alt=media\&token=702341c4-9c14-49d2-9719-96fdf8d1845b)

{% hint style="info" %}
For multi-language environments using **WPML** or **Polylang** plugins, you can choose the synonym language as well. Otherwise this option is set to Default (empty).
{% endhint %}

### Editing a synonym

To edit a synonym row, click on the **Edit** button on the right side of the row. The same editor will appear, that is used to add a new synonym.

![To open the synonym editor](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQbc29CxlfpkBUnLdR%2F-LBQeWtR3gSGB4tFXqug%2Fimage.png?alt=media\&token=8942fd5a-7ffc-44fe-8bc2-0b442f822a6c)

![Synonym editor](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQbc29CxlfpkBUnLdR%2F-LBQenlpOs0fKV1Mtgta%2Fimage.png?alt=media\&token=84186ac4-73da-4edf-8458-591255b59370)

### Deleting a synonym or deleting all synonyms

To delete an individual synonym row, click on the **Delete** button. Alternatively, you can delete all synonyms by clicking the **Delete all** button on the top right side of the panel.

![Delete a synonym or delete all synonyms](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQbc29CxlfpkBUnLdR%2F-LBQfZar-6FDPVRI8-8_%2Fimage.png?alt=media\&token=55930897-a7ec-4949-9ba7-1aa659eda04d)

### Synonyms as keywords option

{% hint style="warning" %}
This option can be very resource-heavy, when using lots of synonyms (100s of definitions). Make sure to avoid using it, unless it is indeed useful in your case.
{% endhint %}

![Synonyms as keywords option](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-L_vnmAF7WM4JZb7guMR%2F-L_voHCnfZp9Jym5BMOf%2Fimage.png?alt=media\&token=f5a1e240-4918-44e2-8f6f-3337d93204c3)

This option comes in handy, when the defined original => synonyms pairs should be used as synonyms => original as well.

For example, if there is a definition of keywords and synonyms as:

`original => synonym1, synonym2`

..then, if this option is enabled, the plugin will also generate these additional definitions during indexing:

```
synonym1 => original, synonym2
synonym2 => original, synonym1
```

In other words, the plugin will also look for keywords *synonym1* and *synonym2* and index the original keyword and the rest of the synonyms with them.

## Export and Import

Export and import feature lets you export the content of the synonyms database, and import it on a different installation, or for simply back-up purposes.

### Export

Click on the **Export** button on the top right side of the panel.

![The export button](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQiS_0DW6rOqv24rYe%2F-LBQj-gkFn6WBGn6xhNL%2Fimage.png?alt=media\&token=57601bfe-fddc-4937-98a8-1893b9ac4847)

A pop-up window will open. Click the **Generate New** button, to generate a new export file.

![Click the Generate new button](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQiS_0DW6rOqv24rYe%2F-LBQjL0aLQj4XymKSZwT%2Fimage.png?alt=media\&token=59c0c850-ad2e-4534-bf57-6062c0d8cc3a)

After a short time, a link will appear. Click on it to save the export file on your computer.

![Click on the link to download the latest export file](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQiS_0DW6rOqv24rYe%2F-LBQjeVcU9NOVBLxR44J%2Fimage.png?alt=media\&token=586b359b-8333-42c3-8189-e9983eb04d3e)

&#x20;The exported file is a .txt file, please do not change the file type.

### Import

{% hint style="info" %}
Duplicate items within the database and the import file are **ignored**, and not overwritten
{% endhint %}

To import previously exported synonyms, click on the **Import** button on the top right side of the panel.

![Import button location](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQjqHXzP45WI5Sgj5Z%2F-LBQk7QxswW5uU3UXqnm%2Fimage.png?alt=media\&token=3e1706d7-240f-4b9c-a054-170b48cc5374)

A pop-up window will open. Click on the upload button to upload the import file via the media library uploader, and select it.

![Click the upload button to open the media library uploader](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQjqHXzP45WI5Sgj5Z%2F-LBQkWmYdnfdCc6M3BgG%2Fimage.png?alt=media\&token=3f32406b-cdf0-49b4-bc98-4920a1b367b4)

After selecting the file, click the **Import** button. After a short time, the success message should appear, with the number of imported items.

![Importing the items](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9jkFgNo4lpUof35gvS%2F-LBQjqHXzP45WI5Sgj5Z%2F-LBQlFC30_5mzLJ7CLU2%2Fimage.png?alt=media\&token=fe5a1a1f-538d-4759-ba53-775c2ff539ab)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.ajaxsearchpro.com/index-table/synonyms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
