You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ A [Coveo Push API](https://docs.coveo.com/en/12/api-reference/push-api) client l
9
9
The Coveo `push-api-client.java` package is stored on GitHub packages.
10
10
You will need a personal access token (classic) with at least `read:packages` scope to install this dependency.
11
11
12
-
For details, see [Authenticating to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-to-github-packages)
12
+
For details, see [Authenticating to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-to-github-packages).
13
13
14
14
## Installation
15
15
@@ -29,7 +29,7 @@ You can install this GitHub Package with [Apache Maven](https://maven.apache.org
29
29
</repository>
30
30
```
31
31
32
-
1. Add your GitHub personal access token with read:packages permission to install packages from GitHub Packages.
32
+
2. Add your GitHub personal access token with `read:packages` permission to install packages from GitHub Packages.
33
33
34
34
```xml
35
35
<servers>
@@ -41,21 +41,25 @@ You can install this GitHub Package with [Apache Maven](https://maven.apache.org
41
41
</servers>
42
42
```
43
43
44
-
### Step 2: Add a Coveo dependency to project
44
+
Replace `USERNAME` with your GitHub username and `TOKEN` with your personal access token.
45
45
46
-
Add a Coveo dependency to your Maven project by editing the `pom.xml` file.
46
+
### Step 2: Add a Coveo Dependency to Your Project
47
+
48
+
Add a Coveo dependency to your Maven project by editing the `pom.xml` file:
47
49
48
50
```xml
49
51
<dependency>
50
52
<groupId>com.coveo</groupId>
51
53
<artifactId>push-api-client.java</artifactId>
52
-
<version>2.3.0</version>
54
+
<version>2.6.1</version> <!-- Replace with the version of your choice or the latest version -->
53
55
</dependency>
54
56
```
55
57
56
-
### Step 3: Install the project files
58
+
Replace `2.6.1` with the version of your choice or the latest version.
59
+
60
+
### Step 3: Install the Project Files
57
61
58
-
To install the updated project files, build the Maven project.
62
+
To install the updated project files, build the Maven project:
59
63
60
64
```bash
61
65
mvn install
@@ -89,10 +93,9 @@ public class PushOneDocument {
89
93
}
90
94
}
91
95
}
92
-
93
96
```
94
97
95
-
### Exponential backoff retry configuration
98
+
### Exponential Backoff Retry Configuration
96
99
97
100
By default, the SDK leverages an exponential backoff retry mechanism. Exponential backoff allows for the SDK to make multiple attempts to resolve throttled requests, increasing the amount of time to wait for each subsequent attempt. Outgoing requests will retry when a `429` status code is returned from the platform.
98
101
@@ -110,7 +113,7 @@ The exponential backoff parameters are as follows:
110
113
111
114
Optional, will default to 2.
112
115
113
-
You may configure the exponential backoff that will be applied to all outgoing requests. To do so, specify use the `BackoffOptionsBuilder` class to create a `BackoffOptions` object when creating either a `PushService`, `PushSource`, or `StreamService` object:
116
+
You may configure the exponential backoff that will be applied to all outgoing requests. To do so, use the `BackoffOptionsBuilder` class to create a `BackoffOptions` object when creating either a `PushService`, `PushSource`, or `StreamService` object:
@@ -127,9 +130,7 @@ By default, requests will retry a maximum of 10 times, waiting 5 seconds after t
127
130
If you want to push multiple documents to your Coveo organization and use a service for that (e.g. `PushService`, `StreamService`), you may find it useful to configure a **logger** to catch error and warning messages.
128
131
129
132
1. Go to your project's root folder.
130
-
131
-
1. Update the Apache Log4j2 configuration by editing the `log4j2.xml` file.
132
-
The following example will print the log execution to the console.
133
+
2. Update the Apache Log4j2 configuration by editing the `log4j2.xml` file. The following example will print the log execution to the console.
133
134
134
135
```xml
135
136
<?xml version="1.0" encoding="UTF-8"?>
@@ -147,9 +148,9 @@ If you want to push multiple documents to your Coveo organization and use a serv
147
148
</Configuration>
148
149
```
149
150
150
-
For more details, see [Log4j2 configuration](https://logging.apache.org/log4j/2.x/manual/configuration.html).
151
+
For more details, see [Log4j2 configuration](https://logging.apache.org/log4j/2.x/manual/configuration.html).
151
152
152
-
## Formatting the code before contributing
153
+
## Formatting the Code Before Contributing
153
154
154
155
This project uses [Google Java Format](https://github.com/google/google-java-format), so make sure your code is properly formatted before opening a pull request.
155
156
@@ -212,3 +213,7 @@ git push --tags
212
213
### Step 3 - Manually Create a Release
213
214
214
215
Lastly, manually create a release on the [GitHub repository](https://github.com/coveo/push-api-client.java/releases). This action will trigger the package deploy workflow action.
0 commit comments