We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
details: 1.the rows of json file need >=30(the result is correct when the rows is <=20) 2.both row_based and column_based
steps: 1.Create collection: String collectionName="Collection_"+ MathUtil.getRandomString(10); FieldType fieldType1 = FieldType.newBuilder() .withName("book_id") .withDataType(DataType.Int64) .withPrimaryKey(true) .withAutoID(false) .build(); FieldType fieldType2 = FieldType.newBuilder() .withName("word_count") .withDataType(DataType.Int64) .build(); FieldType fieldType3 = FieldType.newBuilder() .withName(CommonData.defalutVectorField) .withDataType(DataType.FloatVector) .withDimension(128) .build(); CreateCollectionParam createCollectionReq = CreateCollectionParam.newBuilder() .withCollectionName(collectionName) .withDescription("Test"+collectionName+"search") .withShardsNum(2) .addFieldType(fieldType1) .addFieldType(fieldType2) .addFieldType(fieldType3) .build(); R collection = BaseTest.milvusClient.createCollection(createCollectionReq); 2. Upload json file to minio : FileUtils.fileUploader(path,"bigJson0.json","bigData"); 3. Bulk load R bulkload = milvusClient.bulkload(BulkloadParam.newBuilder() .withCollectionName(newColltcion) .addFile("bigData/bigJson0.json").withRowBased(false) .build()); 4. query: String query_Param = "book_id in [2,4,6,8]"; List outFields=Arrays.asList("book_id","word_count"); QueryParam queryParam= QueryParam.newBuilder() .withCollectionName(newColltcion) .withOutFields(outFields) .withExpr(query_Param) .build(); R queryResultsR = milvusClient.query(queryParam); QueryResultsWrapper wrapperQuery = new QueryResultsWrapper(queryResultsR.getData()); System.out.println("query book_id:"+wrapperQuery.getFieldWrapper("book_id").getFieldData()); System.out.println("query word_count:"+wrapperQuery.getFieldWrapper("word_count").getFieldData());
bigJson0.json.zip
The text was updated successfully, but these errors were encountered:
No branches or pull requests
details:
1.the rows of json file need >=30(the result is correct when the rows is <=20)
2.both row_based and column_based
steps:
1.Create collection:
String collectionName="Collection_"+ MathUtil.getRandomString(10);
FieldType fieldType1 = FieldType.newBuilder()
.withName("book_id")
.withDataType(DataType.Int64)
.withPrimaryKey(true)
.withAutoID(false)
.build();
FieldType fieldType2 = FieldType.newBuilder()
.withName("word_count")
.withDataType(DataType.Int64)
.build();
FieldType fieldType3 = FieldType.newBuilder()
.withName(CommonData.defalutVectorField)
.withDataType(DataType.FloatVector)
.withDimension(128)
.build();
CreateCollectionParam createCollectionReq = CreateCollectionParam.newBuilder()
.withCollectionName(collectionName)
.withDescription("Test"+collectionName+"search")
.withShardsNum(2)
.addFieldType(fieldType1)
.addFieldType(fieldType2)
.addFieldType(fieldType3)
.build();
R collection = BaseTest.milvusClient.createCollection(createCollectionReq);
2. Upload json file to minio :
FileUtils.fileUploader(path,"bigJson0.json","bigData");
3. Bulk load
R bulkload = milvusClient.bulkload(BulkloadParam.newBuilder()
.withCollectionName(newColltcion)
.addFile("bigData/bigJson0.json").withRowBased(false)
.build());
4. query:
String query_Param = "book_id in [2,4,6,8]";
List outFields=Arrays.asList("book_id","word_count");
QueryParam queryParam= QueryParam.newBuilder()
.withCollectionName(newColltcion)
.withOutFields(outFields)
.withExpr(query_Param)
.build();
R queryResultsR = milvusClient.query(queryParam);
QueryResultsWrapper wrapperQuery = new QueryResultsWrapper(queryResultsR.getData());
System.out.println("query book_id:"+wrapperQuery.getFieldWrapper("book_id").getFieldData());
System.out.println("query word_count:"+wrapperQuery.getFieldWrapper("word_count").getFieldData());
bigJson0.json.zip
The text was updated successfully, but these errors were encountered: