Skip to Content
Business Trends

SAP HANA’s Built-In Search Engine

Few people know that there is a search engine built right into the core of the SAP HANA platform. Whenever you deal with large amounts of unstructured textual data like patent documents, incident messages and consumer reviews etc., SAP HANA provides everything you need for a “Google-like” search experience.

  • Plain vanilla keyword search
  • Linguistic search (searching for ‘computer’ will also find document about ‘computers’)
  • Error tolerant search in order to deal with typos (‘tadabase’ will find ‘database’)
  • Semantic search (‘car’ will find ‘automobile’)
  • Phrase search (‘”white house”‘ will find ‘white’ and ‘house’ in sequence)
  • Pattern search (‘poly*’ will find ‘polymer’ and ‘polycarbonate’)

A standalone “engine” is not enough, however. That’s why SAP HANA also includes the Info Access “InA” toolkit for HTML5. The InA toolkit is a set of HTML5 templates and UI controls which you can use to configure a modern, highly interactive UI running in a browser. No code – just configuration.

The example below shows a search UI built with the InA toolkit on car complaints data. The large result area in the UI shows the individual complaints for a search with “battery”. The smaller areas on the left are so-called “search facets” that let you drill down into the results, e.g. filtering the results by MODEL = Explorer.


The big difference of SAP HANA compared to other open source or commercial search engines are its modeling capabilities. You can change the way your data is exposed in a flexible and instant manner. As an example, you start with a document model similar to the “car complaints” used in the UI shown above: MAKE, MODEL, COMPONENT, DESCRIPTION and so on. Now, you would like to include additional data about the car manufacturer, let’s say the manufacturer’s REVENUE or LOCATION. You can simply add the new data to the search model using the graphical modeling tools of SAP HANA Studio and that’s it – no re-indexing your data is required. Right away you can adapt the InA UI to expose the additional data.


SAP HANA’s search capabilities are fully exposed in SQL. So if you are an application developer accessing SAP HANA through ODBC/JDBC there is no need to learn a proprietary syntax. Just write

SELECT * FROM car_complaints_model WHERE CONTAINS (description, ‘battery’);

to retrieve “battery” related complaints.

Last but not least, let me highlight that you can combine the speed of SAP HANA for analytics with fulltext search, thereby bridging the gap between structured and unstructured data. The car complaints data used in the above UI also includes numeric data: MILEAGE for example. With HANA you can calculate the average mileage per car make for “battery” related complaints in plain SQL.

You must be Logged on to comment or reply to a post.
  • First: Nice article, thank you for this.

    My question:

    How do I exactly implement the "Semantic search". I know about the Fuzzy and Lingustic search and how to implent this, but I can't find a good source for implenting a semantic search.

    Any links or further information ?

    • Hi Johannes,

      you’d use the so-called TERMMAPPING table for semantic search. This table basically contains a pair of terms plus a weight:

      Automobile – car – 0.9

      Automobile – truck – 0.6

      Automobile – tin on wheels – 0.2

      In a search query you can then reference the TERMMAPPING table and the query will be enriched to also include terms that map to the query terms. The weights are taken into account when calculating a relevance score.

      See chapter Term Mappings in the SAP HANA Developer Guide.

      Regards, Markus

    • Hi Thorsten,

      Well… yes and no. You could say that some of the TREX code was re-factored/re-written to be an integral part of the SAP HANA database, but there is no such thing as a “TREX” component in SAP HANA.

      Regards, Markus

  • Very nice Marcus. Would like to see the Roadmap for SAP Netweaver ES vs SAP HANA's Built-In Search Engine and how SAP HANA's Built-In Search Engine will look like comparivetly in a couple of years time...I would like to see the plan going forward...for example "remote search" and when this will be available.

  • Hi Markus,

    great article! Can you also provide a link on how I can access the "search-facets" shown in your article via SQL, as "SAP HANA's search capabilities are fully exposed in SQL" there must be a way to do so, unfortunately I was not able to find it.

    Thanks in advance,


  • Hi Markus,

    Thank you very much for the nice blog.

    I am trying to setup knowledge base in SAP CRM 7 EHP 3 using HANA, can you please throw some light on how to configure search engine for this purpose.

    Thank you and appreciate your help.



  • Hi, is it possible to use the build in Hana search enging for classic ses search? in TA SES_ADMIN it is only possible to select an rfc connection to a trex server, but no selection for hana db like it can be done for enterprise search.

  • Hi Biagio, the SES based search will not work with HANA. However, there is a newer version of this technology available since a while. We referred to it as "embedded search" since some years, nowdays we use the name "SAP HANA enterprise search". The roadmap presentation should give a good overview
    Regards, Markus

  • hi Markus
    there are some unanswered questions above about searching with DMS documents, One of the previous advantages of TREX was the ability to do a text search within the contents of an attached document. Is this type of search supported by Hana search, if not can TREX be integrated with the Hana search setup

    This search option is particularly important as it removes the need to have the DMS documents tagged with all the relevant fields.

    thank you

  • Hi Terry,
    with regards to "searching within DMS" or within Business Suite in general, HANA does replace TREX. See the "SAP HANA enterprise search roadmap" for some details:
    Regards, Markus

  • Hi Markus,
    I checked the roadmap document that you had provided as a reply to Terry. However I am not clear on if Enterprise search on HANA supports searching within the documents (say kpro). Could you please clarify?

  • Hi Shalini,
    in general, SAP HANA supports documents (e.g. pdf files) for search. SAP HANA enterprise search adds Business Suite and S/4 integration and content, i.e. search models. Search models can comprise "documents" - attachments to business objects like "business partner" or "material" for insatnce. Documents are usually stored in DMS/KPRO/Content Server... so yes, KPRO documents are supported by SAP HANA enterprise search.
    Regards, Markus

  • Hi Markus,
    Our product is not on S/4 HANA, however we are on Suite on HANA with SAP EHP3 FOR SAP NETWEAVER 7.0. Can these features still work? If not from which release are they available?
    Thanks, Shalini