IRPCIndexingDataSource2.GetTextContentForFileForIX
Server integration API / specialized internal: not for applications read session idempotent
Gets the text that the server extracts from a file version for indexing, in the response.
The text is the same that the search index receives: it is produced with the vault's full-text extraction settings even when viewer files are disabled for users, and it is cached on the server for later use.
| Service | Indexing data source (version 2) MFiles.IRPCIndexingDataSource2 |
|---|---|
| gRPC method | /MFiles.IRPCIndexingDataSource2/GetTextContentForFileForIX |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-text-content-for-file-for-ix |
| Request | GetTextContentForFileForIXRequest |
| Response | GetTextContentForFileForIXResponse |
| Book and level | Server integration API, specialized |
| Kind | read |
| Session | Required: the session ID from LogIn in the mfiles-session-id-bin metadata. |
| Idempotent | yes |
| Returns metadata structure version | no |
| Streaming | none (unary) |
Remarks
For M-Files components only. M-Files' cloud search indexing services call it. Applications should not call it.
- Requires a vault session with the vault rights
see_all_objectsandsee_deleted_objects. - May create and cache the text extract of the file on the server.
- A file with no extractable text returns an empty
text_content. A file whose extraction failed returnstext_unavailabletrue. External (unmanaged) files fail with "Not implemented.".
Request: GetTextContentForFileForIXRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
obj_file_ver | ObjFileVer | The object and file version. |
obj_file_ver.obj_id | ObjID | The object that owns the file. |
obj_file_ver.obj_id.type | int32 | The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID). |
obj_file_ver.obj_id.item_id | ItemID | The ID of the object within its type, in item_id.internal_id. |
obj_file_ver.file_ver | FileVer | The specific file version, as in File.file_ver. |
obj_file_ver.file_ver.file_id | FileID | The file. |
obj_file_ver.file_ver.type | FileVerType | FILE_VER_TYPE_SPECIFIC for a file version number.Values: FILE_VER_TYPE_UNINITIALIZED (0), FILE_VER_TYPE_LATEST (1), FILE_VER_TYPE_ANY (2), FILE_VER_TYPE_SPECIFIC (3). |
obj_file_ver.file_ver.internal_version | int32 | The file version number. |
obj_file_ver.file_ver.external_repository_version | string | Used only for files in external repositories. Leave empty. |
obj_file_ver.file_ver.external_repository_sort_key | int64 | Used only for files in external repositories. Leave 0. |
file_format | FileFormat | FILE_FORMAT_PLAIN_TEXT or FILE_FORMAT_MARKDOWN; unset (FILE_FORMAT_NATIVE) means plain text. A Markdown request falls back to plain text when the server cannot produce Markdown.Values: FILE_FORMAT_NATIVE (0), FILE_FORMAT_PDF (1), FILE_FORMAT_DISPLAY_ONLY_PDF (2), FILE_FORMAT_PLAIN_TEXT (3), FILE_FORMAT_MARKDOWN (4). |
Response: GetTextContentForFileForIXResponse
The response of GetTextContentForFileForIX: the extracted text in the response body and the format actually produced.
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
text_content | string | The extracted text (UTF-8). Empty when the file has no extractable text. |
file_format | FileFormat | The format actually produced.Values: FILE_FORMAT_NATIVE (0), FILE_FORMAT_PDF (1), FILE_FORMAT_DISPLAY_ONLY_PDF (2), FILE_FORMAT_PLAIN_TEXT (3), FILE_FORMAT_MARKDOWN (4). |
text_unavailable | bool | True when no text could be produced for a non-empty file; text_content is then empty and says nothing about the file. |