![JAR search and dependency download from the Maven repository](/logo.png)
com.microsoft.semantickernel.data.vectorsearch.VectorSearchResults Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of semantickernel-api Show documentation
Show all versions of semantickernel-api Show documentation
Defines the public interface for the Semantic Kernel
// Copyright (c) Microsoft. All rights reserved.
package com.microsoft.semantickernel.data.vectorsearch;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* The search results.
*
* @param The type of the search results.
*/
public class VectorSearchResults {
private final long totalCount;
private final List> results;
private final Map metadata;
/**
* Creates a new instance of the VectorSearchResults class.
*
* @param results The search results.
*/
public VectorSearchResults(List> results) {
this(results, results.size(), Collections.emptyMap());
}
/**
* Creates a new instance of the VectorSearchResults class.
*
* @param results The search results.
* @param totalCount The total count of search results.
* @param metadata The metadata.
*/
public VectorSearchResults(List> results, long totalCount,
Map metadata) {
this.results = Collections.unmodifiableList(results);
this.totalCount = totalCount;
this.metadata = Collections.unmodifiableMap(metadata);
}
/**
* Gets the total count of search results.
* This value represents the total number of results that are available for the current query and not the number of results being returned.
*
* @return The total count of search results.
*/
public long getTotalCount() {
return totalCount;
}
/**
* Gets the search results.
*
* @return The search results.
*/
public List> getResults() {
return results;
}
/**
* Gets the metadata associated with the search results.
*
* @return The metadata.
*/
public Map getMetadata() {
return metadata;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy