This is an automated email from the ASF dual-hosted git repository. hossman pushed a commit to branch jira/SOLR-17975 in repository https://gitbox.apache.org/repos/asf/solr.git
commit 89fe6f7d73c2023aba02b18387dfd24285f6fdc1 Author: Chris Hostetter <[email protected]> AuthorDate: Thu Jan 15 15:34:01 2026 -0700 javadocs --- .../schema/StrFloatLateInteractionVectorField.java | 22 ++++++++++++++++++---- .../org/apache/solr/search/ValueSourceParser.java | 1 - .../solr/search/TestLateInteractionVectors.java | 3 ++- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/schema/StrFloatLateInteractionVectorField.java b/solr/core/src/java/org/apache/solr/schema/StrFloatLateInteractionVectorField.java index 29da2b6f413..f80b6cbea54 100644 --- a/solr/core/src/java/org/apache/solr/schema/StrFloatLateInteractionVectorField.java +++ b/solr/core/src/java/org/apache/solr/schema/StrFloatLateInteractionVectorField.java @@ -46,7 +46,13 @@ import org.apache.solr.uninverting.UninvertingReader; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** nocommit: jdocs */ +/** + * An implementation of {@link LateInteractionVectorField} backed by {@link LateInteractionField} + * that externally represents all <code>float[][]</code> values (both field values and query values) + * encoded as a (single) String. + * + * <p>Example: <code>[[1.1,-2.2,3],[4.0,5,-6.6],[7,8,99.99]]</code> + */ public class StrFloatLateInteractionVectorField extends FieldType implements LateInteractionVectorField { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @@ -129,7 +135,7 @@ public class StrFloatLateInteractionVectorField extends FieldType return scoreFunction; } - // nocommit: jdocs + @Override public DoubleValuesSource parseLateInteractionValuesSource( final String fieldName, final FunctionQParser fp) throws SyntaxError { final String vecStr = fp.parseArg(); @@ -211,8 +217,11 @@ public class StrFloatLateInteractionVectorField extends FieldType } /** - * nocommit: jdocs, note input must not be null, dimension must be positive + * Converts a String representation of 1 or more float vectors of the specified <code>dimension + * </code> into a <code>float[][]</code> * + * @param dimension must be a positive integer + * @param input String value to be parsed, must not be null * @lucene.experimental */ public static float[][] stringToMultiFloatVector(final int dimension, final String input) @@ -260,8 +269,13 @@ public class StrFloatLateInteractionVectorField extends FieldType } /** - * nocommit: jdocs, note input must not be null(s), dimensions must be positive + * Formats a non empty <code>float[][]</code> representing vectors into a string for external + * representation. + * + * <p>NOTE: no validation is done to confirm that the individual <code>float[]</code> values have + * consistent length. * + * @param input String value to be parsed, must not be null * @lucene.experimental */ public static String multiFloatVectorToString(final float[][] input) { diff --git a/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java b/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java index 1c2cf28e435..04e17b78d8e 100644 --- a/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java +++ b/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java @@ -1361,7 +1361,6 @@ public abstract class ValueSourceParser implements NamedListInitializedPlugin { addParser("childfield", new ChildFieldValueSourceParser()); - // nocommit: Better name? addParser( "lateVector", new ValueSourceParser() { diff --git a/solr/core/src/test/org/apache/solr/search/TestLateInteractionVectors.java b/solr/core/src/test/org/apache/solr/search/TestLateInteractionVectors.java index e0f83936b19..c82c0cf4ca1 100644 --- a/solr/core/src/test/org/apache/solr/search/TestLateInteractionVectors.java +++ b/solr/core/src/test/org/apache/solr/search/TestLateInteractionVectors.java @@ -33,10 +33,11 @@ import org.apache.lucene.search.LateInteractionFloatValuesSource.ScoreFunction; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.schema.SchemaField; +import org.apache.solr.schema.StrFloatLateInteractionVectorField; import org.junit.After; import org.junit.Before; -// nocommit: jdocs +/** Basic tests of {@link StrFloatLateInteractionVectorField} FieldType */ public class TestLateInteractionVectors extends SolrTestCaseJ4 { @Before
