Ansicht
Dokumentation

SRTV_CALL_CORPUS_COMPILER - Text Retrieval: Aufruf des Corpus Compiler

SRTV_CALL_CORPUS_COMPILER - Text Retrieval: Aufruf des Corpus Compiler

CL_GUI_FRONTEND_SERVICES - Frontend Services   CL_GUI_FRONTEND_SERVICES - Frontend Services  
Diese Dokumentation steht unter dem Copyright der SAP AG.
SAP E-Book

Beispiel

Hinweise

Weiterführende Informationen

Two steps are necessary to implement the search engine:

1. This first function module SRTV_CALL_CORPUS_COMPILER allows you to build a lexicon from a set of existing documents. It parses all the documents and stores them into a lexicon building an indexing for all entries.

2. The second available function SRTV_CALL_DOCUMENT_RETRIEVER retrieves from the lexicon the documents that match the words of the query text entered by the user. The final result is a hit list of documents closest to the query text.

Because of the heuristic nature of the retrieval tool, few restrictions were made so that it can be available in different languages.

-,,Boolean expressions are in this search engine not interpreted: negations are not taken into consideration

-,,numbers are discarded

-,,all words are converted into lower case

-,,by default, words that are less or equal to 3 characters long will not be entered into the lexicon.

- ,,special characters such as punctuation and numbers are discarded

-,,special characters specific to a language are converted to an equivalent letter. For example in German ä is converted into an a, or in French é converted into an e.

Some of these rules can be defined in the table SRTVCORPAR.

Customizing is available in SRTV_CALL_CORPUS_COMPILER in the

following callback functions using the table SRTVCLIENT:

-,,ls_client-cb_actchck: actuality check allowing the compilation of the lexicon at a given time.


CALL FUNCTION ls_client-cb_actchck
EXPORTING
id_corpusid = id_corpusid
id_last_comp_date = ls_lexicon-crdate
id_last_comp_time = ls_lexicon-crtime
IMPORTING
ed_compilemode = ld_compilemode
EXCEPTIONS
cancel_compilation = 1
OTHERS = 2

id_corpusid,,,,corpus identification. This parameter is specific for each corpus.

id_last_comp_date,,date of the latest lexicon computation.

id_last_comp_time,,time of the latest lexicon compilation. The lexicon has to be recompiled

from time to time for performance purposes

ed_compilemode,,allows you to choose between 3 compilation modes:
- srtv_compile is, by default, the value set for a full compilation of the lexicon
- srtv_add : adds one or more documents to the lexicon and therefore recompiles the index of the lexicon
- srtv_delete: deletes one or more documents and recompiles the index of the lexicon

-,,ls_client-cb_chksrch: the introduction of special terms specific to a corpus during the retrieval process.

- ,,ls_client-cb_docread: is the set of documents from which the lexicon will be generated.


CALL FUNCTION is_client-cb_docread
EXPORTING
id_corpusid = is_corpus-corpusid
CHANGING
cd_documents = lt_documents
cd_no_more_documents = ld_no_more_documents
EXCEPTIONS
no_documents_found = 1
OTHERS = 2.

cd_documents,, documents necessary for building the lexicon and the indexing

cd_no_more_documents

-,,ls_client-cb_sptread: special terms important to the search can in this call-back routine

-,,the field lexclntdep from the table SRTVCLIENT checks for

client dependency (SPACE: lexicon is client independent)

The results of this function for a defined corpus and client are :

- the compilation of a lexicon sorted in alphabetical order which can be viewed in the internal table SRTVLEXENT for client independent systems (SRTMLEXENT for client dependent systems)

- the creation of an internal table SRTVOCCUR containing all the lexicon entries with the associated internal document number (SRTMOCCUR for client dependent systems).

- the creation of an internal table SRTVEXTID listing the number of the internal document associated to its original document name (SRTMEXTID for client dependeNt systems).





Parameter

IB_LOG
ID_CORPUSID
ID_DO_COMMIT
ID_LANGU

Ausnahmen

COMPILATION_CANCELLED
COMPILER_ERROR
CUSTOMIZING_INCORRECT
LANGUAGE_NOT_SUPPORTED
NO_DOCUMENTS_FOUND

Funktionsgruppe

SRTV1

TXBHW - Original Tax Base Amount in Local Currency   BAL_S_LOG - Application Log: Log header data  
Diese Dokumentation steht unter dem Copyright der SAP AG.

Length: 5391 Date: 20240523 Time: 115613     sap01-206 ( 63 ms )