# IRPCIndexingDataSource.GetNextObjectsForIX

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Server integration API](https://developer.m-files.com/APIs/gRPC-API/integration/index.md) > [Indexing data source](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/GetNextObjectsForIX/

Badges: `Server integration API / specialized` `internal: not for applications` `write` `session`

Gets next objects and their data for indexing.

- **Service:** [Indexing data source](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/index.md) `MFiles.IRPCIndexingDataSource`
- **gRPC method:** `/MFiles.IRPCIndexingDataSource/GetNextObjectsForIX`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-next-objects-for-ix`
- **Request:** [`GetNextObjectsForIXRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/GetNextObjectsForIX/index.md#request)
- **Response:** [`GetNextObjectsForIXResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/GetNextObjectsForIX/index.md#response)
- **Book and level:** Server integration API, specialized
- **Kind:** write
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

**For M-Files components only.** Search indexers call it to fetch the next batch for a combined
index. Applications should not call it.
- Requires a vault session with the vault rights `see_all_objects` and `see_deleted_objects`.
- To fetch one object by ID outside a crawl, indexers use
  [GetObjectForIXById](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource2/GetObjectForIXById/index.md).

<a id="request"></a>

## Request: GetNextObjectsForIXRequest

> 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 |
|---|---|---|
| `indexing_request` | [`IndexingRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.IndexingRequest/index.md) | General information about the request. |
| `indexing_request.options_obsolete` | `uint32` | Control flags for the request. |
| `indexing_request.options` | [`INDEXINGREQUESTFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.INDEXINGREQUESTFLAGS/index.md) | Control flags for the request. |
| `indexing_request.options.all` | `bool` | Specifies all flags set; Including any future flags. |
| `indexing_request.options.accept_modifications` | `bool` | The indexer accepts new and modified objects in the request. |
| `indexing_request.options.accept_destructions` | `bool` | The indexer accepts destructions of objects in the request. |
| `indexing_request.options.accept_acl_modifications` | `bool` | The indexer accepts ACL modifications of objects in the request. |
| `indexing_request.index_name` | [`IndexName`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.IndexName/index.md) | Identifies the index. |
| `indexing_request.index_name.configuration_name` | `string` | The name of the index configuration. |
| `indexing_request.index_name.repository_connection` | `string` | Identifies the external repository connection. |
| `indexing_request.index_name.configuration_type` | [`IndexConfigurationType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.IndexConfigurationType/index.md) | The index configuration type (e.g., Shared versus Legacy). Values: `INDEX_CONFIGURATION_TYPE_UNKNOWN` (0), `INDEX_CONFIGURATION_TYPE_LEGACY` (1), `INDEX_CONFIGURATION_TYPE_SHARED` (2), `INDEX_CONFIGURATION_TYPE_ANY` (3). |
| `indexing_request.auxiliary_indexer_id` | `string` | If not null, identifies auxiliary indexer that consumes the data. |
| `indexing_request.partition` | [`IndexerPartition`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.IndexerPartition/index.md) | If set, specifies how to partition the candidate objects for this caller. |
| `indexing_request.partition.rule` | [`IndexerPartitioningRule`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.IndexerPartitioningRule/index.md) | Specifies how the indexing is partitioned. |
| `indexing_request.partition.id` | `uint32` | Zero-based identifier of the partition. |
| `indexing_request.last_indexed_timestamp` | [`LogicalTimestamp`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestamp/index.md) | The last indexed logical timestamp. Ignored if its type is `LOGICAL_TIMESTAMP_TYPE_IGNORED`. |
| `indexing_request.last_indexed_timestamp.type` | [`LogicalTimestampType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.LogicalTimestampType/index.md) | Logical timestamp type. Values: `LOGICAL_TIMESTAMP_TYPE_UNINITIALIZED` (0), `LOGICAL_TIMESTAMP_TYPE_IGNORED` (1), `LOGICAL_TIMESTAMP_TYPE_INTEGER` (2), `LOGICAL_TIMESTAMP_TYPE_STRING` (3), `LOGICAL_TIMESTAMP_TYPE_INTEGER_AND_STRING` (4). |
| `indexing_request.last_indexed_timestamp.data` | [`LogicalTimestampUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestampUnion/index.md) | The data as a union. |
| `indexing_request.last_change_tracking_timestamp` | [`LogicalTimestamp`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestamp/index.md) | Change Tracking version from last indexed logical timestamp. |
| `indexing_request.last_change_tracking_timestamp.type` | [`LogicalTimestampType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.LogicalTimestampType/index.md) | Logical timestamp type. Values: `LOGICAL_TIMESTAMP_TYPE_UNINITIALIZED` (0), `LOGICAL_TIMESTAMP_TYPE_IGNORED` (1), `LOGICAL_TIMESTAMP_TYPE_INTEGER` (2), `LOGICAL_TIMESTAMP_TYPE_STRING` (3), `LOGICAL_TIMESTAMP_TYPE_INTEGER_AND_STRING` (4). |
| `indexing_request.last_change_tracking_timestamp.data` | [`LogicalTimestampUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestampUnion/index.md) | The data as a union. |
| `indexing_request.indexer_location` | [`IndexerLocation`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.IndexerLocation/index.md) | Defines if indexer making the request is of type internal (legacy) or external. Values: `INDEXER_LOCATION_UNINITIALIZED` (0), `INDEXER_LOCATION_LEGACY` (1), `INDEXER_LOCATION_EXTERNAL` (2). |
| `last_for_ix` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | Last indexed object ID. If unset, ignored. |
| `last_for_ix.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). |
| `last_for_ix.item_id` | [`ItemID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The ID of the object within its type, in `item_id.internal_id`. |
| `last_for_ix.item_id.internal_id` | `int32` | The ID of the object or value list item. |
| `last_for_ix.item_id.external_repository_id` | [`ExternalRepositoryID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExternalRepositoryID/index.md) | Used only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault. |
| `count` | `uint32` | The number of objects requested. |

<a id="response"></a>

## Response: GetNextObjectsForIXResponse

> 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 |
|---|---|---|
| `data[]` | repeated [`ObjectDataForIX`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectDataForIX/index.md) | The data of the object versions for indexing. |
| `data[].primary_obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The primary identity of the object. Also valid when the object has been destroyed. |
| `data[].primary_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). |
| `data[].primary_obj_id.item_id` | [`ItemID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The ID of the object within its type, in `item_id.internal_id`. |
| `data[].is_destroyed` | `bool` | True if the object has been destroyed and is no longer available. If true then only the objidPrimary and oim members are valid. |
| `data[].is_skipped` | `bool` | True if the object has been skipped and cannot be indexed. If true then only the objidPrimary and oim members are valid. |
| `data[].object_version` | [`ObjectVersionExWP`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionExWP/index.md) | Contains the basic object version information, always latest checked-in version. |
| `data[].object_version.object_version` | [`ObjectVersionEx`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionEx/index.md) | Object info. |
| `data[].object_version.properties[]` | repeated [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | Property values, or an empty array. |
| `data[].object_version.acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | If set, ACL. |
| `data[].object_version.current_user_permissions` | [`ObjectPermissionsForClient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectPermissionsForClient/index.md) | If set, permissions of the object version. |
| `data[].version_comment` | [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | The version comment history of the object excluding checkedout version. |
| `data[].version_comment.property_def` | `int32` | The property definition ID, for example 0 for "Name or title" or 100 for "Class". |
| `data[].version_comment.value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The value. Its `type` must match the data type of the property definition. |
| `data[].updated_files[]` | repeated [`FileID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileID/index.md) | Identifies the files that have been updated. |
| `data[].updated_files[].type` | [`FileIDType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileIDType/index.md) | `FILE_IDTYPE_SPECIFIC` for one file. Values: `FILE_IDTYPE_UNINITIALIZED` (0), `FILE_IDTYPE_ALL` (1), `FILE_IDTYPE_ANY` (2), `FILE_IDTYPE_SPECIFIC` (3). |
| `data[].updated_files[].internal_id` | `int32` | The file ID. |
| `data[].updated_files[].external_repository_id` | `string` | Used only for files in external repositories. Leave empty. |
| `data[].alias_obj_ids[]` | repeated [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | Additional ID aliases for the object such as the external object ID, if any, in some other system/repository/vault. |
| `data[].alias_obj_ids[].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). |
| `data[].alias_obj_ids[].item_id` | [`ItemID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The ID of the object within its type, in `item_id.internal_id`. |
| `data[].index_metadata` | [`ObjectIndexMetadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectIndexMetadata/index.md) | Metadata information for storing the object in the index. |
| `data[].index_metadata.relative_relevance_score` | `float` | Relevance score of the object. |
| `data[].index_metadata.last_modified_for_indexing_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | The last modified timestamp for indexing. |
| `data[].index_metadata.version_for_ix` | [`LogicalTimestamp`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestamp/index.md) | Logical timestamp for indexing. |
| `data[].repository_path` | [`FolderArray`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderArray/index.md) | If not null contains the array of folders describing the repository path to the object version location. |
| `data[].repository_path.value[]` | repeated [`Folder`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Folder/index.md) | Array of Folder structures. |
| `data[].all_editors_history` | [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | Aggregated DISTINCT user IDs (VALUELIST_USERS) from PROPERTYDEF_LASTMODIFIEDBY and PROPERTYDEF_VERSION_EDITORS across every checked-in version, represented as MSLOOKUP from VALUELIST_USERS. Empty when the feature flag is off or for external-repository objects. |
| `data[].all_editors_history.property_def` | `int32` | The property definition ID, for example 0 for "Name or title" or 100 for "Class". |
| `data[].all_editors_history.value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The value. Its `type` must match the data type of the property definition. |
| `data[].acl_for_indexing` | [`SimpleACL`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SimpleACL/index.md) | Pre-resolved read-permission projection of this object version's ACL: one entry per component (index 0 is the custom component, the rest are automatic components in stable order), each reduced to concrete allowed/denied actor IDs with additive components merged in, deleted components removed, and pseudo-users resolved. unset if not supplied by this server; set with zero entries if supplied and the ACL resolved to no components. On the checked-out version, the checked-out-to user has already been injected into every component's allowed array; the latest-checked-in version's projection never carries that injection. |
| `data[].acl_for_indexing.value[]` | repeated [`SimpleACLComponent`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SimpleACLComponent/index.md) | Components. |
| `last_seen_obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | Last seen object ID. |
| `last_seen_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). |
| `last_seen_obj_id.item_id` | [`ItemID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The ID of the object within its type, in `item_id.internal_id`. |
| `last_seen_obj_id.item_id.internal_id` | `int32` | The ID of the object or value list item. |
| `last_seen_obj_id.item_id.external_repository_id` | [`ExternalRepositoryID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExternalRepositoryID/index.md) | Used only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault. |
| `last_seen_version_for_ix` | [`LogicalTimestamp`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestamp/index.md) | Last seen logical timestamp within the returned objects or the timestamp after trying to fetch the batch even if no objects were returned (relevant for indexing external repositories). |
| `last_seen_version_for_ix.type` | [`LogicalTimestampType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.LogicalTimestampType/index.md) | Logical timestamp type. Values: `LOGICAL_TIMESTAMP_TYPE_UNINITIALIZED` (0), `LOGICAL_TIMESTAMP_TYPE_IGNORED` (1), `LOGICAL_TIMESTAMP_TYPE_INTEGER` (2), `LOGICAL_TIMESTAMP_TYPE_STRING` (3), `LOGICAL_TIMESTAMP_TYPE_INTEGER_AND_STRING` (4). |
| `last_seen_version_for_ix.data` | [`LogicalTimestampUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestampUnion/index.md) | The data as a union. |
| `last_seen_version_for_ix.data.integer` | [`LogicalTimestampInteger`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestampInteger/index.md) (oneof data) | Logical timestamp as an int64 vector. |
| `last_seen_version_for_ix.data.string` | [`LogicalTimestampString`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestampString/index.md) (oneof data) | String. |
| `last_seen_version_for_ix.data.integer_and_string` | [`LogicalTimestampIntegerAndString`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestampIntegerAndString/index.md) (oneof data) | Integer and string. |
| `peida` | [`IndexerDataAvailability`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.IndexerDataAvailability/index.md) | Flags that tell which kinds of indexer data are available. Values: `INDEXER_DATA_AVAILABILITY_UNKNOWN` (0), `INDEXER_DATA_AVAILABILITY_AVAILABLE` (1), `INDEXER_DATA_AVAILABILITY_EXHAUSTED` (2), `INDEXER_DATA_AVAILABILITY_ABORTED` (3). |

<a id="related"></a>

## Related methods

- [IRPCIndexingDataSource2.GetObjectForIXById](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource2/GetObjectForIXById/index.md): Gets the index data of one object by its ID: the same data that [GetNextObjectsForIX](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/GetNextObjectsForIX/index.md) returns for the latest checked-in version and, if requested, the checked-out version.
