Show TOC

Procedure documentationEnabling Searching in Long Texts

 

To make your business objects fully searchable, you should index the long texts. This guarantees that notes and comments are included in the search.

Embedded Search provides the generic model ESH_SAPSCRIPT_TEXT. This corresponds to the SAPscript store and automatically extracts the long texts, after an association has been established. You find a description on how to create the association under Defining Node Relations.

The object key for texts in SAPscript is saved in the TDNAME field by default. This field is also the key of the LONGTEXT node in the model ESH_SAPSCRIPT_TEXT. You need to assign a relevant attribute of the parent node to this key for this association.

There are various cases you have to know:

  • Case A: key corresponds to exactly one attribute

  • Case B: key consists of a row of multiple attributes

    If the key used for long texts in SAPscript consists of a set of multiple attributes (which corresponds to a concatenation of the values in the TDNAME field), this row must also be modeled in the model. Prepare this row in advance.

    The TDNAME field must be included in the structure of the parent node and must be filled using the values of the summarized attributes for every instance.

    • a) This happens automatically with nodes based on standard extractors of Embedded Search.

    • b) With nodes that are based on BW DataSources, you need to add the field to the extraction structure and fill the field in the extractor of the BW DataSource during the extraction process.

Long texts in SAPscript are also classified by the object type TDOBJECT, which must be predefined in the association.

As the other key fields of the SAPscript long texts, text type (TDID) and language (TDSPRAS) are completely extracted, you can ignore them during the modeling process.

Once you have completed the modeling process, the initial indexing and the delta indexing of the data are performed.

Procedure

To be able to use SAPscript long texts with the search, you need to create an association between your model and the LONGTEXT node of the ESH_SAPSCRIPT_TEXT model.

  1. To create the required association for longtexts, choose Create –> Association.

  2. Select the LONGTEXT target node from the ESH_SAPSCRIPT_TEXT model.

  3. Select the created node ESH_SAPSCRIPT_TEXT.LONGTEXT in the upper table and enter the following cardinalities: Cardinality=Arbitrary

    Reverse Cardinality=Exactly one

  4. If a foreign key relation is not automatically entered in the lower table, create the required foreign key relation between the long text node and its parent node in your model manually.

    Mind the following cases:

    • Case A: key corresponds to exactly one attribute If the key used for the long texts in SAPscript corresponds to exactly one attribute of the associated parent node of your Business Object (for example, a GUID), create a foreign key relation between this attribute and the TDNAME key of the ESH_SAPSCRIPT_TEXT model. •

    • Case B: key consists of a set of multiple attributes

      If the key used for long texts in SAPscript consists of a set of multiple attributes (which corresponds to a concatenation of the values in the TDNAME field), this set must also be modeled. Prepare this set in advance.

      The TDNAME field must be included in the structure of the parent node and must be filled using the values of the summarized attributes for every instance.

      • a) This happens automatically with nodes based on standard extractors of Embedded Search.

      • b) With nodes that are based on BW DataSources, you need to add the field to the extraction structure and fill the field in the extractor of the BW DataSource during the extraction process.

  5. Once the field TDNAME is included in the structure of the parent node, assign it to the key attribute TDNAME of the long text node.

  6. Long texts in SAPscript are also classified by the object type TDOBJECT, which must be predefined in the association.

    • Therefor create an additional foreign key relation.

    • Assign the object type that you use for your long texts to the TDOBJECT node of the ESH_SAPSCRIPT_TEXT model. This corresponds to the TDOBJECT value in your SAPscript long texts.