SAP ABAP Data Element TREXD_ATTR_TYPE (Attribute type)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-TRX-API (Application Component) TREX ABAP + JAVA API
     STREX (Package) TREX ABAP client
Basic Data
Data Element TREXD_ATTR_TYPE
Short Description Attribute type  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type TREXD_ATTR_TYPE    
Data Type CHAR   Character String 
Length 1    
Decimal Places 0    
Output Length 1    
Value Table      
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID   
Default Component name    
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short 10 AttrType 
Medium 15 Attribute Type 
Long 20 Attribute Type 
Heading
Documentation

Definition

Attribute type in TREX

Use

Features and restrictions of the various attribute types

  • N - Text
    The handling of text attributes in TREX is different to the handling of all other attribute types:
    • When indexing a text, TREX recognizes single words, separated by a blank, a hyphen and so on. (In Japanese the words are not separated by blanks, but TREX can nevertheless recognize them.) - Then the words can later be searched quickly. Searches can only be case-insensitive.

      Example

      A text that contains 'New York' can later be found by searching for 'York' or 'york'.
    • When memorizing the words found in a text, TREX runs a linguistic analysis and, if inflected words are found, the base form is assigned as well.

      Example

      A text that contains 'houses' can later be found by searching for 'house' when performing a linquistic search.
  • S - String
    Searches for string attributes can be case-sensitive or case-insensitive. In contrast to text attributes, TREX does not split a string into single words and there is no linguistic analysis. Therefore search terms for strings must either be fully-qualified or contain appropriate wildcards.
    Another difference is that the indexing of string attributes is much faster than the indexing of text attributes. And string attributes can be used as join attributes, which is not possible for text attributes.

    Example
    'New York State' as the value of a string typed attribute can only be found by searching with terms such as 'New York State', 'new york state', '*York S*', '*york s*', '*York*' or '*york*'.

    Note that string searches with a wildcard term like *york* can be very resource-intensive for long strings or a large amount of documents.
  • D - Date
    Attribute type D is suitable for dates and timestamps. Transferred values must comply with one of the following formats:

    YYYY
    YYYYMM
    YYYYMMDD
    YYYYMMDDhh
    YYYYMMDDhhmm
    YYYYMMDDhhmmss
  • T - Time
    Attribute type T can be used for time. But you should always consider giving preference to timestamps (type D), because in most scenarios, timestamps result in less complex queries and better search performance.
  • I - Integer
    Attribute type I corresponds to ABAP type INT4 and is also suitable for NUMC fields up to 9 digits.
  • F - Float
    Attribute type F corresponds to ABAP type FLTP.
    Note that rounding differences may occur. If you cannot accept these, you should consider using attribute type X.
  • X - Fixed number of digits before and after the decimal point
    Attribute type X supports fixed point figures and can also be used for NUMC fields with up to 32 digits.
    Note that when using type X, you must communicate to TREX the attribute name, type and number of digits before and after the decimal point when creating the index or at least in a separate call before transferring the values.
  • G - Packed string (GUID like)
    Attribute type G was specially designed for the external representation of GUIDs (Global Unique Identifiers), such as ABAP domain SYSUUID_C.
    Technically the TREX internal representation is optimized for strings that only contain 16 different values per digit, which is true for the external representation of hexadecimal figures.
    You can still transfer strings with more values per digit, but then the performance advantage is reduced.
    Note that type G does not support case-insensitive searching.

History
Last changed by/on SAP  20141013 
SAP Release Created in 640