mosuka / blast

Blast is a full text search and indexing server, written in Go, built on top of Bleve.
Apache License 2.0
1.08k stars 76 forks source link

key issue #3

Closed fils closed 6 years ago

fils commented 6 years ago

trying to get started with blast...

tried the command and got "key path not found"

fils@xps:~/src/git/blast/bin$ cat ../doc1.json  | xargs -0 ./blast put document --request
Error: Key path not found
Usage:
  blast put document [flags]

Flags:
      --grpc-server-address string   Blast server to connect to using gRPC (default "0.0.0.0:5000")
      --dial-timeout int             dial timeout (default 5000)
      --request-timeout int          request timeout (default 5000)
      --id string                    document id
      --fields string                document fields
      --request string               request file
  -h, --help                         help for document

Global Flags:
      --output-format string   output format (default "json")
  -v, --version                show version number

with document

{
    "document": {
        "id": "1",
        "fields": {
            "name": "Bleve",
            "description": "Bleve is a full-text search and indexing library for Go.",
            "category": "Library",
            "popularity": 3.0,
            "release": "2014-04-18T00:00:00Z",
            "type": "document"
        }
    }
}

any ideas what I am doing wrong?

mosuka commented 6 years ago

Hi @fils ,

I had forgot to update README.md. Please try following:

{
  "id": "1",
  "fields": {
    "name": "Bleve",
    "description": "Bleve is a full-text search and indexing library for Go.",
    "category": "Library",
    "popularity": 3.0,
    "release": "2014-04-18T00:00:00Z",
    "type": "document"
  }
}