Instantiating the Push API Client

The first step in writing an application is to create a Push API client instance to connect to Exalead CloudView.

This page discusses:

See Also
Operations and states
Indexing your first PAPI document
Indexing a Document Collection
Listing Synced Documents

You must specify the connector name (in connectorName) that will be displayed in the Administration Console, for example, myPapiApp.

The connector name allows you to distinguish between two documents coming from two different connectors. Thus a document identifier in Exalead CloudView is made as follows: (connectorName, documentURI).

Java code

import com.exalead.papi.helper.*;

final PushAPI papi = PushAPIFactory.createHttp(PushAPIVersion.PAPI_V4, host, port, connectorName, 
connectorType, login, password); 

C# code

using Exalead.PushApi.Client;
PushAPI papi = PushAPIFactory.CreateHttp(host, port, connectorName, connectorType, login, password);