How to make a custom class searchable in Elastic Search?

1 minute read time.

Previously on last blog here, I discussed “A very basic example of V7 style coding with Representation and Class”.

As part of V7 and higher, Sage X3 has a new component called Elastic search, which after setup, you can search X3 using Elastic search by typing your search in the top right corner of your landing page.



Now I like to discuss How you can add the Custom class and representation created under last blog entry to elastic search.

.

  1. Open Development, Classes, Classes
  2. Select ZCLIENT class and check mark Searchable.



  3. Click on Properties tab and check mark Searchable for any Property that you like to be searched.


  4. Save and Validate.
  5. Open Development, Classes, Representations.

  6. Select ZCLIENT representation and check mark Used for search results.




  7. Note that only properties in Detail Facet will be searchable. This means only properties that have Detail set to yes are searchable.




  8. Save and Validate.
  9. Open Administration, Usage, Automate, Search Index management.
  10. Select ZCLIENT for the entities.



  11. Click Update Index.






  12. After the index is done, you can search by your field in the representation in the Elastic search.



  13. Also you can drill down to the record by clicking on the link.

Conclusion:


You can easily make any Class to be searchable.

What is next:

In future blogs I am going to show how you can manage two tables like a header and line in new V7 style coding.