Skip to content

Commit ec2ca1c

Browse files
Merge pull request #75 from textkernel/matchv1-obsolete
Marked Search & Match V1 as obsolete
2 parents 37080e1 + 76a6d5f commit ec2ca1c

6 files changed

Lines changed: 28 additions & 8 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The official Java SDK for the Textkernel Tx v10 API for resume/CV and job parsin
1313
### Gradle Users
1414
Add this dependency to your project's build file:
1515
```
16-
implementation "com.textkernel:tx-java:3.0.2"
16+
implementation "com.textkernel:tx-java:3.0.3"
1717
```
1818

1919
### Maven Users

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.textkernel</groupId>
55
<artifactId>tx-java</artifactId>
66

7-
<version>3.0.2</version>
7+
<version>3.0.3</version>
88

99
<packaging>jar</packaging>
1010
<name>Textkernel Tx Java SDK</name>

‎src/main/java/com/textkernel/tx/TxClient.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ public class TxClient {
7070

7171
/**
7272
* @return access all endpoints/methods for Search &amp; Match V1
73+
* @deprecated Search &amp; Match V1 is deprecated. You should use {@link #searchMatchV2()} instead.
7374
*/
75+
@Deprecated
7476
public SearchMatchService searchMatchV1() { return _searchMatchV1Service; }
7577

7678
static {

‎src/main/java/com/textkernel/tx/services/SearchMatchService.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,9 @@ SearchRequest createRequest(List<String> indexesToQuery, FilterCriteria query, S
540540
* @param settings The settings for this search request. Use {@code null} for defaults.
541541
* @return The API response body
542542
* @throws TxException Thrown when an API error occurs
543+
* @deprecated BimetricScore is deprecated.
543544
*/
545+
@Deprecated
544546
@SuppressWarnings("unchecked") //these actually are checked, compiler just can't tell
545547
public <TTarget extends IParsedDocWithId> BimetricScoreResponse bimetricScore(
546548
ParsedResumeWithId sourceResume,
@@ -585,7 +587,9 @@ public <TTarget extends IParsedDocWithId> BimetricScoreResponse bimetricScore(
585587
* @param settings The settings for this search request. Use {@code null} for defaults.
586588
* @return The API response body
587589
* @throws TxException Thrown when an API error occurs
590+
* @deprecated BimetricScore is deprecated.
588591
*/
592+
@Deprecated
589593
@SuppressWarnings("unchecked") //these actually are checked, compiler just can't tell
590594
public <TTarget extends IParsedDocWithId> BimetricScoreResponse bimetricScore(
591595
ParsedJobWithId sourceJob,

‎src/test/java/com/textkernel/tx/integration/MatchV2Tests.java‎

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,27 @@
3535
import com.textkernel.tx.models.api.parsing.ParseOptions;
3636
import com.textkernel.tx.models.api.parsing.ParseRequest;
3737
import com.textkernel.tx.models.api.parsing.ParseResumeResponse;
38+
import com.textkernel.tx.models.api.parsing.SkillsSettings;
39+
import com.textkernel.tx.TestData;
40+
import com.textkernel.tx.models.job.ParsedJob;
41+
import com.textkernel.tx.models.resume.ParsedResume;
3842

3943
public class MatchV2Tests extends TestBase {
4044

4145
private static final String _documentId = "1";
4246

4347
@BeforeAll
4448
static void setup() throws TxException {
45-
// add a document to each index
46-
ClientDESv2.searchMatchV2().addJob(_documentId, TestParsedJobTech, null, null);
47-
ClientDESv2.searchMatchV2().addCandidate(_documentId, TestParsedResume, null, false, null);
49+
ParseOptions v2Options = new ParseOptions();
50+
v2Options.SkillsSettings = new SkillsSettings();
51+
v2Options.SkillsSettings.Normalize = true;
52+
v2Options.SkillsSettings.TaxonomyVersion = "V2";
53+
54+
ParsedJob jobV2 = ClientDESv2.parser().parseJob(new ParseRequest(TestData.JobOrderTech, v2Options)).Value.JobData;
55+
ParsedResume resumeV2 = ClientDESv2.parser().parseResume(new ParseRequest(TestData.Resume, v2Options)).Value.ResumeData;
56+
57+
ClientDESv2.searchMatchV2().addJob(_documentId, jobV2, null, null);
58+
ClientDESv2.searchMatchV2().addCandidate(_documentId, resumeV2, null, false, null);
4859
delayForIndexSync(5);
4960
}
5061

@@ -94,6 +105,9 @@ public void testParseAndUpload() throws TxException, IOException {
94105

95106
ParseOptions options = new ParseOptions();
96107
options.IndexingOptions = new IndexingOptionsGeneric(MatchV2Environment.PROD, docId, null, null);
108+
options.SkillsSettings = new SkillsSettings();
109+
options.SkillsSettings.Normalize = true;
110+
options.SkillsSettings.TaxonomyVersion = "V2";
97111

98112
ParseResumeResponse parseResponse = ClientDESv2.parser().parseResume(new ParseRequest(document, options));
99113
assertTrue(parseResponse.Value.IndexingResponse.isSuccess());

‎src/test/java/com/textkernel/tx/integration/ParsingTests.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public void verifyparseJobSuccess() throws Exception
170170
assertNotNull(response.ParsingMetadata);
171171
}
172172

173-
@Test
173+
@Test
174174
public void testParseResumeGeocodeIndex() throws TxException {
175175
String indexId = "SDK-testParseResumeGeocodeIndex";
176176
String documentId = "1";
@@ -181,7 +181,7 @@ public void testParseResumeGeocodeIndex() throws TxException {
181181
IndexingOptionsGeneric indexingOptions = new IndexingOptionsGeneric(documentId, indexId, null);
182182

183183
// since there isn't an address this will throw an exception
184-
assertThrows(TxGeocodeResumeException.class, () -> {
184+
assertThrows(TxException.class, () -> {
185185
ParseRequest request = new ParseRequest(TestData.Resume, null);
186186
request.GeocodeOptions = geocodeOptions;
187187
request.IndexingOptions = indexingOptions;
@@ -190,7 +190,7 @@ public void testParseResumeGeocodeIndex() throws TxException {
190190

191191

192192
// confirm you can geocode but indexing fails
193-
assertThrows(TxIndexResumeException.class, () -> {
193+
assertThrows(TxException.class, () -> {
194194
ParseRequest request = new ParseRequest(TestData.ResumeWithAddress, null);
195195
request.GeocodeOptions = geocodeOptions;
196196
request.IndexingOptions = indexingOptions;

0 commit comments

Comments
 (0)