Skip to content

Commit 647b1a4

Browse files
authored
Merge pull request #1685 from marklogic/feature/optic-removal
Removed zero and random as scoring methods
2 parents 4c2206b + 465f64f commit 647b1a4

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/type/PlanSearchOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public interface PlanSearchOptions {
4343
*/
4444
PlanSearchOptions withBm25LengthWeight(double bm25LengthWeight);
4545
enum ScoreMethod {
46-
LOGTFIDF, LOGTF, SIMPLE, BM25, ZERO, RANDOM;
46+
LOGTFIDF, LOGTF, SIMPLE, BM25;
47+
// zero and random aren't in the 12 EA release.
48+
//ZERO, RANDOM;
4749
}
4850
}

marklogic-client-api/src/test/java/com/marklogic/client/test/rows/FromSearchWithOptionsTest.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.marklogic.client.row.RowRecord;
66
import com.marklogic.client.test.junit5.RequiresML12;
77
import com.marklogic.client.type.PlanSearchOptions;
8+
import org.junit.jupiter.api.Disabled;
89
import org.junit.jupiter.api.Test;
910
import org.junit.jupiter.api.extension.ExtendWith;
1011

@@ -41,14 +42,15 @@ void badBm25LengthWeight() {
4142
}
4243

4344
@Test
45+
@Disabled("zero and random aren't in the 12 EA release.")
4446
void zero() {
45-
rowManager.withUpdate(false);
46-
PlanSearchOptions options = op.searchOptions().withScoreMethod(PlanSearchOptions.ScoreMethod.ZERO);
47-
List<RowRecord> rows = resultRows(op.fromSearch(op.cts.wordQuery("saxophone"), null, null, options));
48-
assertEquals(2, rows.size());
49-
rows.forEach(row -> {
50-
assertEquals(0, row.getInt("score"), "The score for every row should be 0.");
51-
});
47+
// rowManager.withUpdate(false);
48+
// PlanSearchOptions options = op.searchOptions().withScoreMethod(PlanSearchOptions.ScoreMethod.ZERO);
49+
// List<RowRecord> rows = resultRows(op.fromSearch(op.cts.wordQuery("saxophone"), null, null, options));
50+
// assertEquals(2, rows.size());
51+
// rows.forEach(row -> {
52+
// assertEquals(0, row.getInt("score"), "The score for every row should be 0.");
53+
// });
5254
}
5355

5456
@Test

0 commit comments

Comments
 (0)