Skip to content

[Bug] Unable to create nested object in ArangoSearch view definition #462

@dbuades

Description

@dbuades

Description

It is currently not possible to define a Nested object in the arangosearch view definition using the “nested” keyword instead of “fields” as explained in the documentation .

The Go driver defines Fields as Fields ArangoSearchFields, where ArangoSearchFields is defined as map[string]ArangoSearchElementProperties.

Since ArangoSearchElementProperties does not allow for a Nested entry (https://pkg.go.dev/github.com/arangodb/go-driver#ArangoSearchElementProperties), it is not possible to add it.

Context

Using ArangoDB Enterprise v3.10.2 and go-driver v1.4.1

Steps to reproduce

The following snippet works properly:

Analyzers: []string{"identity"},
Fields: arangoDriver.ArangoSearchFields{
	"type": {},
	"properties": arangoDriver.ArangoSearchElementProperties{
		Fields: arangoDriver.ArangoSearchFields{
			"name":        {},
			"valueSymbol": {},
		},
	},
},

The following one returns an error of type unknown field 'Nested' in struct literal of type driver.ArangoSearchElementProperties

Analyzers: []string{"identity"},
Fields: arangoDriver.ArangoSearchFields{
	"type": {},
	"properties": arangoDriver.ArangoSearchElementProperties{
		Nested: arangoDriver.ArangoSearchFields{
			"name":        {},
			"valueSymbol": {},
		},
	},
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions