diff --git a/http/handler_internal_test.go b/http/handler_internal_test.go index e77b987ce..0d00d99c3 100644 --- a/http/handler_internal_test.go +++ b/http/handler_internal_test.go @@ -31,7 +31,7 @@ func TestPostIndexRequestUnmarshalJSON(t *testing.T) { err string }{ {json: `{"options": {}}`, expected: postIndexRequest{Options: pilosa.IndexOptions{}}}, - {json: `{"options": {"keys": true}}`, expected: postIndexRequest{Options: pilosa.IndexOptions{true}}}, + {json: `{"options": {"keys": true}}`, expected: postIndexRequest{Options: pilosa.IndexOptions{Keys: true}}}, {json: `{"options": 4}`, err: "options is not map[string]interface{}"}, {json: `{"option": {}}`, err: "Unknown key: option:map[]"}, {json: `{"options": {"badKey": "test"}}`, err: "Unknown key: badKey:test"}, diff --git a/index.go b/index.go index c3b500d1f..96d45f85c 100644 --- a/index.go +++ b/index.go @@ -95,7 +95,7 @@ func (i *Index) Options() IndexOptions { } func (i *Index) options() IndexOptions { - return IndexOptions{i.keys} + return IndexOptions{Keys: i.keys} } // Open opens and initializes the index.