Skip to content

Commit 1773518

Browse files
committed
A few attributes made optional + comments + Demo section added to README
1 parent e15012e commit 1773518

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ or to *pom.xml* (if you use maven)
3535
## Config ⚙️
3636

3737
- Env. variables: `PINECONE_SCALA_CLIENT_API_KEY`, and `PINECONE_SCALA_CLIENT_ENV`
38-
- File config (default): [pinecone-scala-client.conf](./pinecone-client/src/main/resources/pinecone-scala-client.conf)
38+
- File config (default): [pinecone-scala-client.conf](./pinecone-client/src/main/resources/pinecone-scala-client.conf)
3939

4040
## Usage 👨‍🎓
4141

@@ -365,6 +365,9 @@ Examples:
365365
println(stats)
366366
)
367367
```
368+
## Demo
369+
370+
For ready-to-run demos pls. refer to a separate seed project demonstrating how to use the client: [here](https://github.com/cequence-io/pinecone-scala-demo).
368371

369372
## FAQ 🤔
370373

pinecone-core/src/main/scala/io/cequence/pineconescala/domain/PVector.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ package io.cequence.pineconescala.domain
33
case class PVector(
44
id: String,
55
values: Seq[Double],
6-
sparseValues: Option[SparseVector],
6+
sparseValues: Option[SparseVector] = None,
77
metadata: Map[String, String]
88
)

pinecone-core/src/main/scala/io/cequence/pineconescala/domain/response/CollectionInfo.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ package io.cequence.pineconescala.domain.response
22

33
case class CollectionInfo(
44
name: String,
5-
// The size of the collection in bytes.
6-
size: Int,
7-
status: String
5+
// The size of the collection in bytes. Not available when initializing
6+
size: Option[Int],
7+
dimension: Int,
8+
status: String // TODO: this can be potentially an enum (== IndexStatus?)
89
)

pinecone-core/src/main/scala/io/cequence/pineconescala/domain/response/QueryResponse.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ case class QueryResponse(
1212
case class Match(
1313
id: String,
1414
score: Double,
15-
values: Seq[Double],
15+
values: Seq[Double], // not returned when includeValues = false
1616
sparseValues: Option[SparseVector],
17-
metadata: Map[String, String]
17+
metadata: Option[Map[String, String]] // not returned when includeMetadata = true
1818
)

pinecone-core/src/main/scala/io/cequence/pineconescala/service/PineconeServiceConsts.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ trait PineconeServiceConsts {
2121
val Query = QuerySettings(
2222
topK = 10,
2323
includeValues = false,
24-
includeMetadata = false
24+
includeMetadata = true // by default include metadata
2525
)
2626

2727
val CreateIndex = CreateIndexSettings(

0 commit comments

Comments
 (0)