What does Elastic Search do anyway?

5 minute read time.

Elastic Search seems to be one of those features many people simply don’t understand and so ignore.  To be honest, I think any lack of understanding may be partly down to the lack of clear Sage X3 specific documentation available to either the implementor or end-user, so let’s see if I can make things a little clearer… (Please let me know either way by your comments at the end!)

Elastic Search in Sage X3

Elastic Search provides the search button on the top right of the menu screen, allowing users to search data stored in Sage X3 quickly and intuitively.  This doesn’t sound all that exciting, but bear with me.

Example use cases

To demonstrate the features of Elastic Search, I will run through some examples of it’s use.

Example 1: You want to quickly find the Sage X3 function “Customers/Categories” which you don’t often use.  Use the search box and type in the text ”customer” then press enter to launch the search  (You can search for function names from the menu itself of course, but then you have to click through to find the correct one)

 
On the left side of the returned data, we see FUNCTIONS and on the right is DATA relating to our search criteria.  For now, we are only interested to find our function and luckily we can see it on the bottom left of the screen.   We can now click the link to go straight to that function and quickly continue our activities.


Example 2: You need to quickly find a sales order in Sage X3.  
a.    You think you know the sales order number, so start typing in the search box, for example I think the number is “SONGB0210002” so I will type “SONGB” in the search box, but then pause

 
Notice how the query has executed as I type.  I could click the “See more results” to list all the currently found records, but I will continue typing until I see the order I am interested in, then click “See more details” or just press the ENTER key

 
You can click the link which will then take you to that Sales Order in the Read-only pages sales order screen, as shown below:

 
From this screen you can drill down into the Sales Order entry, if you need to make modifications.


b.    You only know the customer name rather than the order number.  In this situation you can search for just the customer name
Type “Amalgamate Supply” and press ENTER to show all search results

 
Notice the filters for data.  In our case we are only interested in Sales Orders, so can check this box to reduce the amount of data being displayed.

 
We can now scroll through the results and find the order we are concerned about.

Example 3: You want to be able to search for an accounting code entered in the Work Costing dimensions.  
Unfortunately, this field is not defined as being searchable by default.  It can however easily be configured to be searchable by updating the WORKCOST Class and Representations.  The steps to do so are described in my colleagues Elastic Search presentation discussed below.

A bit more detail

In simple terms, Elastic Search provides the ability to search through structured and unstructured data to find anything relating to your search criteria.  For Sage X3, this means you can search for things such as a customer name, purchase invoice number, function name or any other data that has been setup to be searchable.

Technically Elastic Search creates its own search indexes, which it then uses when a user submits a query to search for something.   The Sage X3 development teams predefine data to be indexed out of the box, but implementors can add additional fields that are to be indexed (and therefore searchable) to satisfy customers specific business requirements.

One of my colleagues recently put together a presentation on Elastic Search, which covers Installation, Operation and Troubleshooting.  This is available for download from “Index page: Sage X3 Technical Support Tips and Tricks (September 2021)" so I will not duplicate these topics.  Instead, I will cover off some specific questions in a Q&A format below:

Q&A

I don’t want to use Elastic Search, do I really have to install it?
Not anymore.  Until 2023 R1 Elastic Search was a mandatory component and was explicitly needed to be installed and running when you install the Syracuse component.   (in this case, if you really don’t want to use it, you can then stop the Elastic Search service and set it to start-up manually. i.e. Elastic Search service doesn’t need to be running in order for Sage X3 to function.)   With 2023 R1 though, Elastic Search is no longer mandatory pre-requisite.

Is Elastic Search safe and secure?
Yes.  You should follow "Security Best Practices" as published by Sage (See “Further Reading” below).   Additionally, the Syracuse service is the only component that needs to talk to Elastic Search, so you can set your firewall rules to only allow access from the Syracuse server(s)  If Syracuse is on the same server as Elastic Search, the you can configure the networking to use “localhost” for best speed and security.

Why does Elastic Search use so much memory?
Elastic Search is designed to return search results as soon as it can, so will cache as much information as it can in memory to speed up responses.   Over time Elastic Search can take up to the maximum configured memory, which by default is 2GB.  If this is too much overhead for your server, you can configure Elastic Search maximum memory to be a lower value.

Does Elastic Search need to be installed on a separate server?
Not necessarily.  As it’s only Syracuse that talks to it, it may be sensible to install Elastic Search on the same server as Syracuse.   You can review the “Architecture and system requirements” (See “Further Reading” below) to get additional guidance.

Why doesn’t Elastic Search return data, such as an invoice number, in the search results even though I know it exists?
This is likely because the search results are based on Elastic Search indexes which need to be regularly refreshed.  Check if there is a Elastic Search index update scheduled, and how frequently it runs.

Further reading

Sage X3 Elastic Search Online Help http://online-help.sageerpx3.com/erp/12/staticpost/search-engine/

Sage X3 Prerequisites

Elastic Search downloads and documentation https://www.elastic.co/elasticsearch/

Sage X3 Security Best Practices https://online-help.sageerpx3.com/erp/12/staticpost/security-best-practices

Additional notes when upgrading ElasticSearch https://support.na.sage.com/selfservice/viewdocument.do?externalId=99424

Finally

I hope this article has given you some additional insight to how Elastic Search works, please let me know if you found it useful or not.