16 Star 211 Fork 37

GVPdromara/MilvusPlus

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
Apache-2.0

MilvusPlus: Enhanced Vector Database Operations Library

Project Introduction

MilvusPlus

🔥🔥🔥 MilvusPlus (short for MP) is an operational tool for Milvus, designed to simplify interactions with the Milvus vector database, providing developers with an intuitive API similar to MyBatis-Plus annotations and method call style, born to improve efficiency.

Features

  • Non-Invasive: It only enhances without making changes; its introduction will not affect existing projects, as smooth as silk.
  • Low Overhead: It automatically injects basic CRUD operations upon startup, with almost no performance loss, and operates directly on objects.
  • Powerful CRUD Operations: The universal MilvusMapper can achieve CRUD operations with just a small amount of configuration, and has a powerful condition builder to meet all kinds of usage needs.
  • Intuitive API: The direct API design simplifies database operations, and MilvusService provides a rich API.
  • Support for Lambda-style Calls: Lambda expressions make it easy to write various query conditions without worrying about field errors.
  • Support for Automatic Primary Key Generation: Perfectly solves the primary key issue.
  • Support for Custom Global Operations: Supports global method injection.
  • Annotation-based Configuration: Uses an annotation method similar to MyBatis-Plus to configure entity models.
  • Easy to Extend: The core design focuses on extensibility.
  • Type Safety: Uses Java type safety to reduce errors.

Quick Start

Custom extension support:

<dependency>
    <groupId>org.dromara</groupId>
    <artifactId>milvus-plus-core</artifactId>
    <version>2.1.3</version>
</dependency>

Spring application support:

<dependency>
    <groupId>org.dromara</groupId>
    <artifactId>milvus-plus-boot-starter</artifactId>
    <version>2.1.3</version>
</dependency>

Solon application support:

<dependency>
    <groupId>org.dromara</groupId>
    <artifactId>milvus-plus-solon-plugin</artifactId>
    <version>2.1.3</version>
</dependency>

Notes

  • Version 2.0.0 requires the use of index annotations to define indexes; otherwise, an error will occur at startup, and adding them later will be ineffective, requiring the collection to be deleted first.
  • Version 2.0.0 has not yet released the MilvusService functionality.

Configuration File

milvus:
  uri: https://in03-a5357975ab80da7.api.gcp-us-west1.zillizcloud.com
  token: x'x'x'x
  enable: true
  packages:
    - com.example.entity
  • milvus: Defines configurations related to the Milvus service.
    • uri: The URI of the Milvus service, through which the application communicates with the Milvus service.
    • token: A token for verification and authorization, ensuring the security of access to the Milvus service.
    • enable: A boolean value indicating whether the Milvus module should be enabled.
    • packages: These packages contain Java classes corresponding to custom annotations, which you can consider as the package where your custom entity classes are located.

Application Scenarios

  • Similarity Search: Quickly retrieve items most similar to a given vector.
  • Recommendation System: Recommend relevant content based on user behavior and preferences.
  • Image Retrieval: Find the most similar images to the query image in a large-scale image library.
  • Natural Language Processing: Convert text into vectors and perform semantic searches.
  • Bioinformatics: Analyze and compare biological sequences, such as protein and genomic data.

Detailed Explanation of Custom Annotations

Using custom annotations to automate the integration of the Milvus database provides the following significant advantages:

  • Simplifies the Development Process: The database structure is declared directly in the code through annotations, without the need to manually create collections, attributes, indexes, and partitions. The project starts automatically and builds, reducing the need to manually write Milvus API calls.
  • Improves Development Efficiency: The annotation-driven approach makes the creation and management of the database structure more convenient, speeding up development.
  • Enhances Code Readability: Tightly integrates the definition of the database structure with business logic code, improving the readability and maintainability of the code.
  • Reduces Errors: Automated creation of the database structure reduces the possibility of human errors, improving the stability of the system.
  • Easy to Maintain: The use of annotations makes changes to the database structure more centralized and clear, facilitating later maintenance and upgrades.

@ExtraParam Annotation

  • Purpose: Defines additional parameters for indexes or other custom functions.
  • Attributes:
    • key(): The key name of the parameter.
    • value(): The value of the parameter.

@MilvusCollection Annotation

  • Purpose: Defines a collection in the Milvus database.
  • Attributes:
    • name(): The name of the collection.

@MilvusField Annotation

  • Purpose: Defines a field in the Milvus collection.
  • Attributes:
    • name(): The field name, defaulting to the Java field name.
    • dataType(): The data type, defaulting to FLOAT_VECTOR.
    • dimension(): The vector dimension, defaulting to -1.
    • isPrimaryKey(): Whether it is the primary key, defaulting to false.
    • autoID(): Whether to automatically generate an ID, defaulting to false.
    • description(): The field description, defaulting to empty.
    • elementType(): The element type, defaulting to None.
    • maxLength(): The maximum length, defaulting to -1.
    • maxCapacity(): The maximum capacity, defaulting to -1.
    • isPartitionKey(): Whether it is a partition key, defaulting to false.

@MilvusIndex Annotation

  • Purpose: Defines an index in the Milvus collection.
  • Attributes:
    • indexType(): The index type, defaulting to FLAT.
    • metricType(): The metric type, defaulting to L2.
    • indexName(): The index name, defaulting to empty.
    • extraParams(): Additional parameters, defined using the ExtraParam annotation.

@MilvusPartition Annotation

  • Purpose: Defines partitions of the Milvus collection.
  • Attributes:
    • name(): An array of partition names.

Through these annotations, developers can easily define and manage the structure of the Milvus database, achieving the goal of automatically building the required database structure when the project starts.

Detailed Explanation of Index and Metric Types

Index Types (IndexType)

  • INVALID: An invalid index type, used only for internal marking.
  • FLAT: Brute force search, suitable for small-scale datasets.
  • IVF_FLAT: Inverted file flat mode, suitable for medium-scale datasets.
  • IVF_SQ8: Inverted file quantization mode, suitable for large-scale datasets, sacrificing accuracy for speed.
  • IVF_PQ: Inverted file product quantization mode, suitable for large-scale high-dimensional datasets, balancing speed and accuracy.
  • HNSW: Hierarchical navigation small-world graph, providing fast search, suitable for large-scale datasets.
  • DISKANN: Disk-based approximate nearest neighbor search, suitable for large-scale datasets stored on disk.
  • AUTOINDEX: Automatically selects the optimal index type.
  • SCANN: Accelerates search using scanning and tree structures.
  • GPU_IVF_FLAT, GPU_IVF_PQ: GPU-accelerated indexes, suitable for GPU environments.
  • BIN_FLAT, BIN_IVF_FLAT: Dedicated index for binary vectors.
  • TRIE: A dictionary tree index suitable for string types.
  • STL_SORT: A sorting index suitable for scalar fields.

Metric Types (MetricType)

  • INVALID: An invalid metric type, used only for internal marking.
  • L2: Euclidean distance, suitable for floating-point vectors.
  • IP: Inner product, used for calculating cosine similarity.
  • COSINE: Cosine similarity, suitable for text and image searches.
  • HAMMING: Hamming distance, suitable for binary vectors.
  • JACCARD: Jaccard similarity coefficient, suitable for set similarity calculations.

MilvusMapper Functionality

MilvusMapper is a general-purpose interface for operating the Milvus database, providing a series of data manipulation methods, including querying, deleting, updating, and inserting. The following is a functional description of MilvusMapper and its related classes:

MilvusMapper

MilvusMapper is a generic abstract class that inherits from BaseMilvusMapper, providing basic methods for interacting with the Milvus client.

  • Get Milvus Client: getClient() - Returns a MilvusClientV2 instance.

BaseMilvusMapper

BaseMilvusMapper is an abstract class that defines basic operations for interacting with the Milvus database.

  • Create Search Builder Instance: queryWrapper() - Creates a LambdaQueryWrapper instance.
  • Create Delete Builder Instance: deleteWrapper() - Creates a LambdaDeleteWrapper instance.
  • Create Update Builder Instance: updateWrapper() - Creates a LambdaUpdateWrapper instance.
  • Create Insert Builder Instance: insertWrapper() - Creates a LambdaInsertWrapper instance.

Data Operations

  • Get Data by ID: getById(Serializable ... ids)

    • Function: Query data based on the provided list of IDs.
    • Parameters: ids - A list of serializable IDs.
    • Return: MilvusResp<List<MilvusResult<T>>> - The response containing the query results.
  • Delete Data: removeById(Serializable ... ids)

    • Function: Delete data based on the provided list of IDs.
    • Parameters: ids - A list of serializable IDs.
    • Return: MilvusResp<DeleteResp> - The response of the deletion operation.
  • Update Data: updateById(T ... entity)

    • Function: Update data based on the provided entities.
    • Parameters: entity - A list of entity objects.
    • Return: MilvusResp<UpsertResp> - The response of the update operation.
  • Insert Data: insert(T ... entity)

    • Function: Insert the provided entities into the database.
    • Parameters: entity - A list of entity objects.
    • Return: MilvusResp<InsertResp> - The response of the insertion operation.

Builder Methods

  • Create General Builder Instance: lambda(Wrapper<W, T> wrapper) - Initializes and returns a builder instance.

LambdaQueryWrapper Class Functional Documentation

LambdaQueryWrapper<T> is a builder class used to construct and execute Milvus search queries. It provides a series of methods to set query parameters and ultimately execute the query.

Constructors

  • LambdaQueryWrapper(): No-argument constructor.
  • LambdaQueryWrapper(String collectionName, MilvusClientV2 client, ConversionCache conversionCache, Class entityType): Constructor that initializes the collection name, Milvus client, type conversion cache, and entity type.

Partition Settings

  • partition(String ... partitionName): Adds one or more partition names to the query.
  • partition(FieldFunction<T,?>... partitionName): Adds partition names based on the provided field functions.

Search Parameter Settings

  • searchParams(Map<String, Object> searchParams): Sets search parameters.

  • The following are the parameters supported by searchParams and their descriptions:

    • metric_type Type: String Description: Specifies the metric type used for the search operation. It must be consistent with the metric type used when indexing vector fields. Optional values: L2: Euclidean distance, suitable for vector searches in high-dimensional spaces. IP: Inner product, suitable for cosine similarity searches. COSINE: Cosine similarity, the same as inner product, suitable for measuring the angle between vectors. Example: searchParams.put("metric_type", "L2");
    • radius Type: float Description: Sets the minimum similarity threshold for the search operation. When metric_type is set to L2, this value should be greater than range_filter; otherwise, it should be less than range_filter. Example: searchParams.put("radius", 0.5f);
    • range_filter Type: float Description: Limits the similarity range of the search operation. When metric_type is set to IP or COSINE, this value should be greater than radius; otherwise, it should be less than radius. Example: searchParams.put("range_filter", 0.3f); Use Example The following is an example of using searchParams, showing how to build a search request and set specific search parameters:
Map<String, Object> searchParams = new HashMap<>();
searchParams.put("metric_type", "L2");
searchParams.put("radius", 0.5f);
searchParams.put("range_filter", 0.3f);
  • radius(Object radius): Sets the search radius.
  • rangeFilter(Object rangeFilter): Sets the range filter.
  • metricType(Object metric_type): Sets the metric type.

Result Settings

  • outputFields(List outputFields): Sets the fields to be returned.
  • roundDecimal(int roundDecimal): Sets the number of decimal places for the returned distance values.

Query Condition Construction

  • eq(String fieldName, Object value): Adds an equal condition.
  • ne(String fieldName, Object value): Adds a not equal condition.
  • gt(String fieldName, Object value): Adds a greater than condition.
  • ge(String fieldName, Object value): Adds a greater than or equal condition.
  • lt(String fieldName, Object value): Adds a less than condition.
  • le(String fieldName, Object value): Adds a less than or equal condition.
  • between(String fieldName, Object start, Object end): Adds a range condition.
  • isNull(String fieldName): Adds a null check condition.
  • isNotNull(String fieldName): Adds a not null check condition.
  • in(String fieldName, List<?> values): Adds an IN condition.
  • like(String fieldName, String value): Adds a LIKE condition.

JSON and Array Operations

  • jsonContains(String fieldName, Object value): Adds a JSON contains condition.
  • jsonContainsAll(String fieldName, List<?> values): Adds a JSON contains all values condition.
  • jsonContainsAny(String fieldName, List<?> values): Adds a JSON contains any value condition.
  • arrayContains(String fieldName, Object value): Adds an array contains condition.
  • arrayContainsAll(String fieldName, List<?> values): Adds an array contains all values condition.
  • arrayContainsAny(String fieldName, List<?> values): Adds an array contains any value condition.
  • arrayLength(String fieldName, int length): Adds an array length condition.

Logical Operations

  • and(ConditionBuilder other): Adds an AND condition.
  • or(ConditionBuilder other): Adds an OR condition.
  • not(): Adds a NOT condition.

Vector Search Settings

  • annsField(String annsField): Sets the vector field to be searched.
  • vector(List<?> vector): Adds the vector to be searched.
  • vector(String annsField, List<?> vector): Sets the vector field and adds the vector to be searched.
  • topK(Integer topK): Sets the top-k results to be returned.
  • limit(Long limit): Sets the limit on the number of query results.

Executing Queries

  • query(): Builds and executes the search request, returning a wrapped MilvusResp object containing the query results.
  • query(FieldFunction<T,?> ... outputFields): Sets the output fields and executes the query.
  • query(String ... outputFields): Sets the output fields and executes the query.
  • getById(Serializable ... ids): Gets data by ID.

Helper Methods

  • buildSearch(): Builds a complete search request object.
  • buildQuery(): Builds a query request object.

The LambdaQueryWrapper<T> class provides a wealth of methods to build complex search queries, supporting various conditions, logical operations, JSON and array operations, and vector searches. By calling these methods in a chain, users can flexibly construct search requests and obtain the desired query results.

LambdaDeleteWrapper

LambdaDeleteWrapper is a builder class used to construct and execute deletion operations.

  • Add Partition: partition(String partitionName)
  • Add Equal Condition: eq(String fieldName, Object value)
  • Add Not Equal Condition: ne(String fieldName, Object value)
  • Add ID to Deletion List: id(Object id)

Executing Deletion

  • Execute Deletion: remove() - Builds and executes the deletion request.
  • Delete by ID: removeById(Serializable ... ids)

LambdaUpdateWrapper

LambdaUpdateWrapper is a builder class used to construct and execute update operations.

  • Add Partition: partition(String partitionName)

  • execute insertion operations.

  • Add Partition: partition(String partitionName)

  • Add Field Value: put(String fieldName, Object value)

Executing Insertion

  • Insert Data: insert() - Builds and executes the insertion request.
  • Insert Multiple Data: insert(T ... t)

MilvusService Functionality

MilvusService is a comprehensive service that provides full management of the Milvus database. It implements multiple interfaces: IAMService (Identity and Access Management Service), ICMService (Collection Management Service), and IVecMService (Vector Management Service).

Identity and Access Management (IAMService)

The IAMService interface provides functions for creating, deleting, querying users and roles, as well as granting and revoking permissions.

  • Create Role: createRole(String roleName)
  • Create User: createUser(String userName, String password)
  • Describe Role Permissions: describeRole(String roleName)
  • Describe User Information: describeUser(String userName)
  • Drop Role: dropRole(String roleName)
  • Drop User: dropUser(String userName)
  • Grant Role Permissions: grantPrivilege(String roleName, String objectType, String privilege, String objectName)
  • Grant User Role: grantRole(String roleName, String userName)
  • List All Roles: listRoles()
  • List All Users: listUsers()
  • Revoke Role Permissions: revokePrivilege(String roleName, String objectType, String privilege, String objectName, String databaseName)
  • Revoke User Role: revokeRole(String roleName, String userName)
  • Update User Password: updatePassword(String userName, String password, String newPassword)

Collection Management (ICMService)

The ICMService interface provides functions for creating, deleting, querying, renaming, and managing indexes of collections.

  • Create Collection: createCollection(MilvusEntity milvusEntity)
  • Add Field: addField(String collectionName, AddFieldReq ... addFieldReq)
  • Get Field: getField(String collectionName, String fieldName)
  • Describe Collection: describeCollection(String collectionName)
  • Drop Collection: dropCollection(String collectionName)
  • Check if Collection Exists: hasCollection(String collectionName)
  • Get Collection Statistics: getCollectionStats(String collectionName)
  • Rename Collection: renameCollection(String oldCollectionName, String newCollectionName)
  • Create Index for Collection: createIndex(String collectionName, List<IndexParam> indexParams)
  • Describe Index of Collection: describeIndex(String collectionName, String fieldName)
  • Drop Index of Collection: dropIndex(String collectionName, String fieldName)
  • Get Loading Status of Collection or Partition: getLoadState(String collectionName, String partitionName)
  • Load Collection Data into Memory: loadCollection(String collectionName)
  • Release Collection Data from Memory: releaseCollection(String collectionName)
  • Create Partition in Collection: createPartition(String collectionName, String partitionName)
  • Drop Partition in Collection: dropPartition(String collectionName, String partitionName)
  • Check if Partition Exists: hasPartition(String collectionName, String partitionName)
  • List All Partitions in Collection: listPartitions(String collectionName)
  • Load Partitions of Collection into Memory: loadPartitions(String collectionName, List<String> partitionNames)
  • Release Partitions of Collection from Memory: releasePartitions(String collectionName, List<String> partitionNames)

Vector Management (IVecMService)

The IVecMService interface provides functions for inserting, updating, querying, deleting vectors, and performing similarity searches.

  • Delete Entities: delete(String collectionName, String partitionName, String filter, List<Object> ids)
  • Get Entities by ID: get(String collectionName, String partitionName, List<Object> ids, List<String> outputFields)
  • Insert Data: insert(String collectionName, List<JSONObject> data, String partitionName)
  • Query by Scalar Filter Condition: query(String collectionName, List<String> partitionNames, List<String> outputFields, List<Object> ids, String filter, ConsistencyLevel consistencyLevel, long offset, long limit)
  • Perform Vector Similarity Search: search(String collectionName, List<String> partitionNames, String annsField, int topK, String filter, List<String> outputFields, List<Object> data, long offset, long limit, int roundDecimal, Map<String, Object> searchParams, long guaranteeTimestamp, long gracefulTime, ConsistencyLevel consistencyLevel, boolean ignoreGrowing)
  • Upsert Data: upsert(String collectionName, String partitionName, List<JSONObject> data)

Public Method

In addition to the above functionalities, MilvusService also provides a public method to obtain a MilvusClientV2 instance:

  • Get Milvus Client: getClient()

Usage Example

Here is an example of using MilvusPlus for vector search:

Example usage:


@Data
@MilvusCollection(name = "face_collection") // Specifies the name of the Milvus collection
public class Face {
    @MilvusField(
            name = "person_id", // Field Name
            dataType = DataType.Int64, // Data type is 64-bit integer
            isPrimaryKey = true // Mark as Primary Key
    )
    private Long personId; // Unique identifier of the person

    @MilvusField(
            name = "face_vector", // Field Name
            dataType = DataType.FloatVector, // The data type is a floating point vector
            dimension = 128 // Vector dimension, assuming that the dimension of the face feature vector is 128
    )
    @MilvusIndex(
            indexType = IndexParam.IndexType.IVF_FLAT, // Using the IVF FLAT index type
            metricType = IndexParam.MetricType.L2, // Using the L 2 Distance Metric Type
            indexName = "face_index", // Index Name
            extraParams = { // Specify additional index parameters
                    @ExtraParam(key = "nlist", value = "100") // For example, the nlist parameter for IVF
            }
    )
    private List<Float> faceVector; // Storing vectors of face features
}
@Component
public class FaceMilvusMapper extends MilvusMapper<Face> {
    
}

@Component
@Slf4j
public class ApplicationRunnerTest implements ApplicationRunner {
    private final FaceMilvusMapper mapper;

    public ApplicationRunnerTest(FaceMilvusMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public void run(ApplicationArguments args){
        Face face=new Face();
        List<Float> vector = new ArrayList<>();
        for (int i = 0; i < 128; i++) {
            vector.add((float) (Math.random() * 100)); // Using random numbers here as an example only
        }
        face.setPersonId(1l);
        face.setFaceVector(vector);
        
        // add
        List<Face> faces=new ArrayList<>();
        for (int i = 1; i < 10 ;i++){
            Face face1=new Face();
            face1.setPersonId(Long.valueOf(i));
            List<Float> vector1 = new ArrayList<>();
            for (int j = 0; j < 128; j++) {
                vector1.add((float) (Math.random() * 100)); // Using random numbers here as an example only
            }
            face1.setFaceVector(vector1);
            faces.add(face1);
        }
        MilvusResp<InsertResp> insert = mapper.insert(faces.toArray(faces.toArray(new Face[0]))); log.info("insert--{}", JSONObject.toJSONString(insert));
        
        // id query
        MilvusResp<List<MilvusResult<Face>>> query = mapper.getById(9l);
        log.info("query--getById---{}", JSONObject.toJSONString(query));
        
        // VECTOR QUERY
        MilvusResp<List<MilvusResult<Face>>> query1 = mapper.queryWrapper()
                .vector(Face::getFaceVector, vector)
                .ne(Face::getPersonId, 1L)
                .topK(3)
                .query();
        log.info("VectorQuery query--queryWrapper---{}", JSONObject.toJSONString(query1));
        
        // SCALAR QUERY
        MilvusResp<List<MilvusResult<Face>>> query2 = mapper.queryWrapper()
                .eq(Face::getPersonId, 2L)
                .limit(3)
                .query();
        log.info("ScalarQuery   query--queryWrapper---{}", JSONObject.toJSONString(query2));
        
        // update
        vector.clear();
        for (int i = 0; i < 128; i++) {
            vector.add((float) (Math.random() * 100)); // Using random numbers here as an example only
        }
        MilvusResp<UpsertResp> update = mapper.updateById(face);log.info("update--{}", JSONObject.toJSONString(update));
        
        // id Query
        MilvusResp<List<MilvusResult<Face>>> query3 = mapper.getById(1L);log.info("query--getById---{}", JSONObject.toJSONString(query3));
        
        // del
        MilvusResp<DeleteResp> remove = mapper.removeById(1L);log.info("remove--{}", JSONObject.toJSONString(remove));
        
        // query
        MilvusResp<List<MilvusResult<Face>>> query4 = mapper.getById(1L);log.info("query--{}", JSONObject.toJSONString(query4));

    }
}

Contributing

Contributions are welcome!

License

MilvusPlus is open source and available under the License.

Contact

For questions or support, reach out to javpower@163.com.

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

🔥🔥🔥使用MyBatisPlus的方式,优雅的操作向量数据库 Milvus,同时支持spring和solon expand collapse
Java
Apache-2.0
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/dromara/MilvusPlus.git
git@gitee.com:dromara/MilvusPlus.git
dromara
MilvusPlus
MilvusPlus
main

Search