Skip to content

Commit eed8198

Browse files
authored
Merge pull request #335 from marklogic/release/1.2.1
Release 1.2.1
2 parents cc809bc + 7b8a897 commit eed8198

File tree

18 files changed

+69
-46
lines changed

18 files changed

+69
-46
lines changed

NOTICE.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MarkLogic® Flux™
22

3-
Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
3+
Copyright © 2025 MarkLogic Corporation. All Rights Reserved.
44

55
To the extent required by the applicable open-source license, a complete machine-readable copy of the source code corresponding to such code is available upon request. This offer is valid to anyone in receipt of this information and shall expire three years following the date of the final distribution of this product version by Progress Software Corporation. To obtain such source code, send an email to [email protected]. Please specify the product and version for which you are requesting source code.
66

@@ -9,7 +9,7 @@ Third Party Notices
99
aws-java-sdk-s3 1.12.262 (Apache-2.0)
1010
hadoop-aws 3.3.4 (Apache-2.0)
1111
hadoop-client 3.3.4 (Apache-2.0)
12-
marklogic-spark-connector 2.5.0 (Apache-2.0)
12+
marklogic-spark-connector 2.5.1 (Apache-2.0)
1313
picocli 4.7.6 (Apache-2.0)
1414
spark-avro_2.12 3.5.3 (Apache-2.0)
1515
spark-sql_2.12 3.5.3 (Apache-2.0)
@@ -20,7 +20,7 @@ Apache License 2.0 (Apache-2.0)
2020

2121
Third-Party Components
2222

23-
The following is a list of the third-party components used by MarkLogic® Flux™ 1.2.0 (last updated December 17, 2024):
23+
The following is a list of the third-party components used by MarkLogic® Flux™ 1.2.1 (last updated January 7, 2025):
2424

2525
aws-java-sdk-s3 1.12.262 (Apache-2.0)
2626
https://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-s3
@@ -34,7 +34,7 @@ hadoop-client 3.3.4 (Apache-2.0)
3434
https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-client
3535
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
3636

37-
marklogic-spark-connector 2.5.0 (Apache-2.0)
37+
marklogic-spark-connector 2.5.1 (Apache-2.0)
3838
https://repo1.maven.org/maven2/com/marklogic/marklogic-spark-connector
3939
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
4040

@@ -53,7 +53,7 @@ For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
5353

5454
Common Licenses
5555

56-
This section shows the text of common third-party licenses used by MarkLogic® Flux™ v1 (last updated July 2, 2024):
56+
This section shows the text of common third-party licenses used by MarkLogic® Flux™ 1.2.1 (last updated January 7, 2025):
5757

5858
Apache License 2.0 (Apache-2.0)
5959
https://spdx.org/licenses/Apache-2.0.html

docs/api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ To add Flux as a dependency to your application, add the following to your Maven
2222
<dependency>
2323
<groupId>com.marklogic</groupId>
2424
<artifactId>flux-api</artifactId>
25-
<version>1.2.0</version>
25+
<version>1.2.1</version>
2626
</dependency>
2727
```
2828

2929
Or if you are using Gradle, add the following to your `build.gradle` file:
3030

3131
```
3232
dependencies {
33-
implementation "com.marklogic:flux-api:1.2.0"
33+
implementation "com.marklogic:flux-api:1.2.1"
3434
}
3535
```
3636

@@ -97,7 +97,7 @@ buildscript {
9797
mavenCentral()
9898
}
9999
dependencies {
100-
classpath "com.marklogic:flux-api:1.2.0"
100+
classpath "com.marklogic:flux-api:1.2.1"
101101
}
102102
}
103103
```

docs/getting-started.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ This guide describes how to get started with Flux with some examples demonstrati
1515
## Setup
1616

1717
You can download the latest release of the Flux application zip from [the latest Flux release page](https://github.com/marklogic/flux/releases).
18-
The Flux application zip is titled `marklogic-flux-1.2.0.zip`. You can extract this zip to any location on your
18+
The Flux application zip is titled `marklogic-flux-1.2.1.zip`. You can extract this zip to any location on your
1919
filesystem that you prefer.
2020

2121
### Deploying the example application
2222

2323
The examples in this guide, along with examples found throughout this documentation, depend on a small MarkLogic
2424
application that can be deployed to your own instance of MarkLogic server. The application can be downloaded from
2525
[the latest Flux release page](https://github.com/marklogic/flux/releases) in a zip titled
26-
`marklogic-flux-getting-started-1.2.0.zip`. To use Flux with this example application, perform the following steps:
26+
`marklogic-flux-getting-started-1.2.1.zip`. To use Flux with this example application, perform the following steps:
2727

28-
1. Extract the `marklogic-flux-getting-started-1.2.0.zip` file to any location on your local filesystem.
29-
2. Run `cd marklogic-flux-getting-started-1.2.0` to change to the directory created by extracting the ZIP file.
28+
1. Extract the `marklogic-flux-getting-started-1.2.1.zip` file to any location on your local filesystem.
29+
2. Run `cd marklogic-flux-getting-started-1.2.1` to change to the directory created by extracting the ZIP file.
3030
3. Create a file named `gradle-local.properties` and add `mlPassword=your MarkLogic admin user password` to it.
3131
4. Examine the contents of the `gradle.properties` file to ensure that the value of `mlHost` points to your MarkLogic
3232
server and that the value of `mlRestPort` is a port available for a new MarkLogic app server to use.
@@ -38,15 +38,15 @@ privileges for running the examples in this guide. Finally, the application incl
3838
[MarkLogic TDE template](https://docs.marklogic.com/guide/app-dev/TDE) that creates a view in MarkLogic for the purpose
3939
of demonstrating commands that utilize a [MarkLogic Optic query](https://docs.marklogic.com/guide/app-dev/OpticAPI).
4040

41-
It is recommended to extract the Flux application zip into the `marklogic-flux-getting-started-1.2.0` directory so that
41+
It is recommended to extract the Flux application zip into the `marklogic-flux-getting-started-1.2.1` directory so that
4242
you can easily execute the examples in this guide. After extracting the application zip, the directory should have a
4343
structure similar to this (not all files may be shown):
4444

4545
```
46-
./marklogic-flux-getting-started-1.2.0
46+
./marklogic-flux-getting-started-1.2.1
4747
build.gradle
4848
./data
49-
./marklogic-flux-1.2.0
49+
./marklogic-flux-1.2.1
5050
./gradle
5151
gradle.properties
5252
gradlew
@@ -59,7 +59,7 @@ structure similar to this (not all files may be shown):
5959
You can run Flux without any options to see the list of available commands. If you are using Flux to run these examples,
6060
first change your current directory to where you extract Flux:
6161

62-
cd marklogic-flux-1.2.0
62+
cd marklogic-flux-1.2.1
6363

6464
And then run the Flux executable without any options:
6565

docs/import/embedder/embedder.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ refers to the Flux support for generating and adding embeddings. The value of th
4646

4747
As of the 1.2.0 release, Flux recognizes the following abbreviations as a matter of convenience to avoid typing the full class name:
4848

49-
- `--embedder azure` refers to the embedding model provided by the `flux-embedding-model-azure-open-ai-1.2.0.jar` file.
50-
- `--embedder minilm` refers to the embedding model provided by the `flux-embedding-model-minilm-1.2.0.jar` file.
51-
- `--embedder ollama` refers to the embedding model provided by the `flux-embedding-model-ollama-1.2.0.jar` file.
49+
- `--embedder azure` refers to the embedding model provided by the `flux-embedding-model-azure-open-ai-1.2.1.jar` file.
50+
- `--embedder minilm` refers to the embedding model provided by the `flux-embedding-model-minilm-1.2.1.jar` file.
51+
- `--embedder ollama` refers to the embedding model provided by the `flux-embedding-model-ollama-1.2.1.jar` file.
5252

5353
The JAR files associated with each of the above abbreviations can be downloaded from the
5454
[Flux releases site](https://github.com/marklogic/flux/releases) and added to the `./ext` directory in a Flux
@@ -73,7 +73,7 @@ file in your Flux installation and change the `logger.langchain4j.level` logger
7373

7474
### Azure OpenAI options
7575

76-
The `flux-embedding-model-azure-open-ai-1.2.0.jar` file uses
76+
The `flux-embedding-model-azure-open-ai-1.2.1.jar` file uses
7777
[LangChain4's support](https://docs.langchain4j.dev/integrations/embedding-models/azure-open-ai) for
7878
[Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service) and
7979
supports the following options:
@@ -119,7 +119,7 @@ require any setup or configuration.
119119

120120
### Ollama options
121121

122-
The `flux-embedding-model-ollama-1.2.0.jar` file uses
122+
The `flux-embedding-model-ollama-1.2.1.jar` file uses
123123
[LangChain4j's support](https://docs.langchain4j.dev/integrations/embedding-models/ollama) for
124124
[Ollama](https://ollama.com/) and supports the following options:
125125

docs/import/embedder/embedding-query.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ instructions in the [Getting Started guide](../../getting-started.md).
3131

3232
This example uses the ["minilm" embedding model](https://docs.langchain4j.dev/integrations/embedding-models/in-process).
3333
This embedding model is useful for testing vector queries with MarkLogic as it has no external dependencies and requires
34-
no setup or configuration. To use this embedding model, you must include the `flux-embedding-model-minilm-1.2.0.jar`
34+
no setup or configuration. To use this embedding model, you must include the `flux-embedding-model-minilm-1.2.1.jar`
3535
in the `./ext` directory of your Flux installation. Please see the [embedder guide](embedder.md) for more information
3636
on embedding models.
3737

docs/reprocess.md

+3
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ setting either option will adjust the default value of the `--spark-master-url`
234234
the number of Spark worker threads. This ensures that each partition processing items will have a Spark worker thread
235235
available to it.
236236

237+
When using an option such as `--limit`, where you do not want to wait for all the data to be read first,
238+
you may want to include `--thread-count 0` to prevent the data from being repartitioned.
239+
237240
You may also be able to improve reader performance by partitioning your query by database forests. The section on
238241
creating partitions above uses the following, which is a simple way to both create and use forest-based partitions:
239242

docs/spark-integration.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Flux integrates with [spark-submit](https://spark.apache.org/docs/latest/submitt
3535
submit a Flux command invocation to a remote Spark cluster. Every Flux command is a Spark application, and thus every
3636
Flux command, along with all of its option, can be invoked via `spark-submit`.
3737

38-
To use Flux with `spark-submit`, first download the `marklogic-flux-1.2.0-all.jar` file from the
39-
[GitHub release page](https://github.com/marklogic/flux/releases/tag/1.2.0). This jar file includes Flux and all of
38+
To use Flux with `spark-submit`, first download the `marklogic-flux-1.2.1-all.jar` file from the
39+
[GitHub release page](https://github.com/marklogic/flux/releases/tag/1.2.1). This jar file includes Flux and all of
4040
its dependencies, excluding those of Spark itself, which will be provided via the Spark cluster that you connect to
4141
via `spark-submit`.
4242

@@ -48,7 +48,7 @@ The following shows a notional example of running the Flux `import-files` comman
4848
```
4949
$SPARK_HOME/bin/spark-submit --class com.marklogic.flux.spark.Submit \
5050
--master spark://changeme:7077 \
51-
marklogic-flux-1.2.0-all.jar \
51+
marklogic-flux-1.2.1-all.jar \
5252
import-files \
5353
--path path/to/data \
5454
--connection-string user:password@host:8000 \
@@ -59,7 +59,7 @@ $SPARK_HOME/bin/spark-submit --class com.marklogic.flux.spark.Submit \
5959
```
6060
$SPARK_HOME\bin\spark-submit --class com.marklogic.flux.spark.Submit ^
6161
--master spark://changeme:7077 ^
62-
marklogic-flux-1.2.0-all.jar ^
62+
marklogic-flux-1.2.1-all.jar ^
6363
import-files ^
6464
--path path/to/data ^
6565
--connection-string user:password@host:8000 ^

examples/client-project/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
mavenLocal()
77
}
88
dependencies {
9-
classpath "com.marklogic:flux-api:1.2.0"
9+
classpath "com.marklogic:flux-api:1.2.1"
1010
}
1111
}
1212

@@ -20,8 +20,8 @@ repositories {
2020
}
2121

2222
dependencies {
23-
implementation "com.marklogic:flux-api:1.2.0"
24-
implementation "com.marklogic:flux-embedding-model-minilm:1.2.0"
23+
implementation "com.marklogic:flux-api:1.2.1"
24+
implementation "com.marklogic:flux-embedding-model-minilm:1.2.1"
2525
}
2626

2727
tasks.register("runApp", JavaExec) {

flux-cli/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies {
2929
exclude module: "rocksdbjni"
3030
}
3131

32-
implementation "com.marklogic:marklogic-spark-connector:2.5.0"
32+
implementation "com.marklogic:marklogic-spark-connector:2.5.1"
3333
implementation "info.picocli:picocli:4.7.6"
3434

3535
// Spark 3.4.3 depends on Hadoop 3.3.4, which depends on AWS SDK 1.12.262. As of August 2024, all public releases of
@@ -88,7 +88,7 @@ dependencies {
8888
testImplementation project(path: ":flux-embedding-model-azure-open-ai", configuration: "shadow")
8989
testImplementation project(path: ":flux-embedding-model-ollama", configuration: "shadow")
9090

91-
shadowDependencies "com.marklogic:marklogic-spark-connector:2.5-SNAPSHOT"
91+
shadowDependencies "com.marklogic:marklogic-spark-connector:2.5.1"
9292
shadowDependencies "info.picocli:picocli:4.7.6"
9393
}
9494

flux-cli/src/main/java/com/marklogic/flux/api/EmbedderOptions.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
2+
* Copyright © 2025 MarkLogic Corporation. All Rights Reserved.
33
*/
44
package com.marklogic.flux.api;
55

@@ -20,9 +20,7 @@ public interface EmbedderOptions {
2020
*
2121
* @param name either one of the abbreviations listed above, or the fully-qualified class name of an implementation of
2222
* {@code java.util.Function<Map<String, String>, dev.langchain4j.model.embedding.EmbeddingModel>} or
23-
* an abbreviation associated with the class name of an implementation. Due to a bug in Flux 1.2.0,
24-
* the class name must not contain any uppercase characters. This will be fixed in the next Flux
25-
* release.
23+
* an abbreviation associated with the class name of an implementation.
2624
* @return
2725
*/
2826
EmbedderOptions embedder(String name);

flux-cli/src/main/java/com/marklogic/flux/impl/ConnectionInputs.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
package com.marklogic.flux.impl;
55

66
import com.marklogic.client.DatabaseClient;
7+
import com.marklogic.client.impl.ConnectionString;
78
import com.marklogic.flux.api.AuthenticationType;
89
import com.marklogic.flux.api.FluxException;
910
import com.marklogic.flux.api.SslHostnameVerifier;
10-
import com.marklogic.spark.ConnectionString;
11-
import com.marklogic.spark.ConnectorException;
1211
import com.marklogic.spark.Options;
1312
import picocli.CommandLine;
1413

@@ -26,7 +25,7 @@ public static class ConnectionStringValidator implements CommandLine.ITypeConver
2625
public String convert(String value) {
2726
try {
2827
new ConnectionString(value, "connection string");
29-
} catch (ConnectorException e) {
28+
} catch (IllegalArgumentException e) {
3029
// See https://picocli.info/#_handling_invalid_input .
3130
throw new CommandLine.TypeConversionException(e.getMessage());
3231
}
@@ -75,7 +74,7 @@ public void validateConnectionString(String inputNameForErrorMessage) {
7574
if (connectionString != null && connectionString.trim().length() > 0) {
7675
try {
7776
new ConnectionString(connectionString, inputNameForErrorMessage);
78-
} catch (ConnectorException e) {
77+
} catch (IllegalArgumentException e) {
7978
throw new FluxException(e.getMessage());
8079
}
8180
}

flux-cli/src/main/java/com/marklogic/flux/impl/importdata/EmbedderParams.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
2+
* Copyright © 2025 MarkLogic Corporation. All Rights Reserved.
33
*/
44
package com.marklogic.flux.impl.importdata;
55

@@ -154,9 +154,9 @@ public EmbedderOptions embedderOptions(Map<String, String> options) {
154154
return this;
155155
}
156156

157-
private String determineClassName(String embedderValue) {
158-
embedderValue = embedderValue.toLowerCase();
159-
switch (embedderValue) {
157+
private String determineClassName(final String embedderValue) {
158+
String abbreviation = embedderValue.toLowerCase();
159+
switch (abbreviation) {
160160
case "minilm":
161161
return "com.marklogic.flux.langchain4j.embedding.MinilmEmbeddingModelFunction";
162162
case "azure":

flux-cli/src/test/java/com/marklogic/flux/CopyrightTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
4141
String message = String.format("Does not start with copyright comment: %s", file.toFile().getAbsolutePath());
4242
assertTrue(content.startsWith("/*"), message);
4343
assertTrue(
44-
content.contains("Copyright © 2024 MarkLogic Corporation. All Rights Reserved."),
44+
content.contains("Copyright © 2024 MarkLogic Corporation. All Rights Reserved.") ||
45+
content.contains("Copyright © 2025 MarkLogic Corporation. All Rights Reserved."),
4546
message
4647
);
4748
}

flux-cli/src/test/java/com/marklogic/flux/api/GenericFilesImporterTest.java

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
2+
* Copyright © 2025 MarkLogic Corporation. All Rights Reserved.
33
*/
44
package com.marklogic.flux.api;
55

@@ -198,4 +198,20 @@ void splitAndEmbed() {
198198
assertEquals(JsonNodeType.ARRAY, chunk.get("embedding").getNodeType());
199199
});
200200
}
201+
202+
@Test
203+
void splitAndEmbedWithFullClassName() {
204+
Flux.importGenericFiles()
205+
.connectionString(makeConnectionString())
206+
.from("src/test/resources/json-files/java-client-intro.json")
207+
.to(writeOptions -> writeOptions
208+
.permissionsString(DEFAULT_PERMISSIONS)
209+
.uriTemplate("/split-test.json")
210+
.splitter(splitterOptions -> splitterOptions.jsonPointers("/text"))
211+
.embedder(embedderOptions -> embedderOptions.embedder("com.marklogic.flux.langchain4j.embedding.MinilmEmbeddingModelFunction"))
212+
).execute();
213+
214+
JsonNode doc = readJsonDocument("/split-test.json");
215+
assertEquals(2, doc.get("chunks").size(), "Should get 2 chunks with the default max chunk size of 1000.");
216+
}
201217
}

flux-embedding-model-azure-open-ai/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ publishing {
3232
mainJava(MavenPublication) {
3333
groupId = group
3434
version = version
35+
artifactId = project.name
3536
from components.java
3637
pom {
38+
name = "${group}:${project.name}"
3739
description = "Integration for Azure OpenAI with the MarkLogic Flux API"
3840
packaging = "jar"
3941
url = "https://github.com/marklogic/flux"

flux-embedding-model-minilm/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ publishing {
1717
mainJava(MavenPublication) {
1818
groupId = group
1919
version = version
20+
artifactId = project.name
2021
from components.java
2122
pom {
23+
name = "${group}:${project.name}"
2224
description = "Integration for minilm with the MarkLogic Flux API"
2325
packaging = "jar"
2426
url = "https://github.com/marklogic/flux"

flux-embedding-model-ollama/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ publishing {
3333
mainJava(MavenPublication) {
3434
groupId = group
3535
version = version
36+
artifactId = project.name
3637
from components.java
3738
pom {
39+
name = "${group}:${project.name}"
3840
description = "Integration for Ollama with the MarkLogic Flux API"
3941
packaging = "jar"
4042
url = "https://github.com/marklogic/flux"

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=1.2.0
1+
version=1.2.1
22

33
# Define these on the command line to publish to OSSRH
44
# See https://central.sonatype.org/publish/publish-gradle/#credentials for more information

0 commit comments

Comments
 (0)