Skip to content

Commit

Permalink
Add missing model
Browse files Browse the repository at this point in the history
  • Loading branch information
Jotschi committed Feb 7, 2023
1 parent 6303552 commit 0e353e6
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 Johannes Schüth
Copyright 2023 Johannes Schüth

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-client</artifactId>
<version>0.9.1-SNAPSHOT</version>
<version>0.10.0-SNAPSHOT</version>
</parent>

<name>Qdrant Java Client :: common</name>
Expand Down
2 changes: 1 addition & 1 deletion grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-client</artifactId>
<version>0.9.1-SNAPSHOT</version>
<version>0.10.0-SNAPSHOT</version>
</parent>

<name>Qdrant Java Client :: grpc</name>
Expand Down
2 changes: 1 addition & 1 deletion http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-client</artifactId>
<version>0.9.1-SNAPSHOT</version>
<version>0.10.0-SNAPSHOT</version>
</parent>

<name>Qdrant Java Client :: http</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.metaloom.qdrant.client.http.model.collection;

import java.util.Map;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.metaloom.qdrant.client.http.model.RestModel;
Expand Down Expand Up @@ -28,7 +30,7 @@ public class CollectionInfo implements RestModel {
private CollectionConfig config;

@JsonProperty("payload_schema")
private PayloadIndexInfo payloadSchema;
private Map<String, PayloadIndexInfo> payloadSchema;

public CollectionStatus getStatus() {
return status;
Expand Down Expand Up @@ -75,11 +77,11 @@ public CollectionInfo setConfig(CollectionConfig config) {
return this;
}

public PayloadIndexInfo getPayloadSchema() {
public Map<String, PayloadIndexInfo> getPayloadSchema() {
return payloadSchema;
}

public CollectionInfo setPayloadSchema(PayloadIndexInfo payloadSchema) {
public CollectionInfo setPayloadSchema(Map<String, PayloadIndexInfo> payloadSchema) {
this.payloadSchema = payloadSchema;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,42 @@
package io.metaloom.qdrant.client.http.model.collection;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.metaloom.qdrant.client.http.model.RestModel;

public class PayloadIndexInfo implements RestModel {

@JsonProperty("data_type")
private PayloadSchemaType dataType;

private PayloadSchemaParams params;

private int points;

public PayloadSchemaType getDataType() {
return dataType;
}

public PayloadIndexInfo setDataType(PayloadSchemaType dataType) {
this.dataType = dataType;
return this;
}

public PayloadSchemaParams getParams() {
return params;
}

public PayloadIndexInfo setParams(PayloadSchemaParams params) {
this.params = params;
return this;
}

public int getPoints() {
return points;
}

public PayloadIndexInfo setPoints(int points) {
this.points = points;
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package io.metaloom.qdrant.client.http.model.collection;

import com.fasterxml.jackson.annotation.JsonValue;

public enum PayloadSchemaParams {

KEYWORD("keyword"),

INTEGER("integer"),

FLOAT("float"),

GEO("geo"),

TEXT("text");

String name;

private PayloadSchemaParams(String name) {
this.name = name;
}

@JsonValue
public String getName() {
return name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JacksonException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
Expand Down Expand Up @@ -50,6 +49,7 @@ public final class Json {
static {
mapper = new ObjectMapper()
.setSerializationInclusion(Include.NON_NULL);
//.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);

SimpleModule module = new SimpleModule();
module.addDeserializer(NamedVector.class, new NamedVectorDeserializer());
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-client</artifactId>
<version>0.9.1-SNAPSHOT</version>
<version>0.10.0-SNAPSHOT</version>

<parent>
<groupId>io.metaloom</groupId>
Expand Down
2 changes: 1 addition & 1 deletion report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.metaloom.qdrant</groupId>
<artifactId>qdrant-java-client</artifactId>
<version>0.9.1-SNAPSHOT</version>
<version>0.10.0-SNAPSHOT</version>
</parent>

<name>Qdrant Java Client :: report</name>
Expand Down

0 comments on commit 0e353e6

Please sign in to comment.