Croway commented on PR #18356:
URL: https://github.com/apache/camel/pull/18356#issuecomment-3004145798

   ```
   $ camel infra run milvus --json
   {
     "getMilvusEndpointUrl" : "http://localhost:19530";,
     "getMilvusHost" : "localhost",
     "getMilvusPort" : 19530,
     "host" : "localhost",
     "port" : 19530
   }
   ```
   
   ```
   from("timer:java?period=1000")
                   .to("direct:in");
   
           FieldType fieldType1 = FieldType.newBuilder()
                   .withName("userID")
                   .withDescription("user identification")
                   .withDataType(DataType.Array.Int64)
                   .withPrimaryKey(true)
                   .withAutoID(true)
                   .build();
   
           FieldType fieldType2 = FieldType.newBuilder()
                   .withName("userFace")
                   .withDescription("face embedding")
                   .withDataType(DataType.FloatVector)
                   .withDimension(64)
                   .build();
   
           FieldType fieldType3 = FieldType.newBuilder()
                   .withName("userAge")
                   .withDescription("user age")
                   .withDataType(DataType.Int8)
                   .build();
   
           from("direct:in?host=localhost&port=19530")
                   .setHeader(Milvus.Headers.ACTION)
                   .constant(MilvusAction.CREATE_COLLECTION)
                   .setBody()
                   .constant(
                           CreateCollectionParam.newBuilder()
                                   .withCollectionName("test")
                                   .withDescription("customer info")
                                   .withShardsNum(2)
                                   .withEnableDynamicField(false)
                                   .addFieldType(fieldType1)
                                   .addFieldType(fieldType2)
                                   .addFieldType(fieldType3)
                                   .build())
                   .to("milvus:test")
                   .log("${body}");
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to