An Oracle synonym basically allows you to create a pointer to an object that exists somewhere else. For example, in the ROBERT schema we can create a private synonym for SCOTT.For example, assume from the ROBERT schema that we issue a query like SELECT * FROM emp; and the EMP table is not there, we get this error: Notice that we added SCOTT to the beginning of the EMP table reference. EMP table because Oracle will follow the synonym to the correct place as seen here: Note that we said that this was a private synonym. However, it would be a bit of a pain to have to always prefix all SQL calls to the EMP table with SCOTT, there must be an easier way. In the following sections we will discuss the creation and removal of synonyms.We can also create public synonyms using the create public synonym command as seen here: SQL CREATE PUBLIC SYNONYM emp FOR SCOTT. Hence, try not to use public synonyms unless you have to.In this post, I introduce a recently added feature for performing Create-Read-Update-Delete (CRUD) operations on Solr resources using a REST API.Before I delve into the details, let’s first understand what I mean by “resource” and why you might want to perform CRUD operations on it.Another example, as we’ll see below, is a set of synonym mappings used by a Synonym Filter during text analysis.
A synonym is named, and points to a specific object.
For search analyzers that contain a synonym type filter, it would be great to be able to make changes to the synonym file and have those changes recognized immediately by the associated analyzers without having to close/open the index.
Ideally, the synonym cache would be refreshed automatically with changes to the corresponding synonym file.
Whether you want to use synonym expansion or synonym contraction depends on your use-case and won’t be part of this post.
Configuring synonyms in Elasticsearch can be done in two ways.