Documentation ¶
Overview ¶
_ _
*__ _____ __ ___ ___ __ _| |_ ___ *\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ * \ V V / __/ (_| |\ V /| | (_| | || __/ * \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| * * Copyright © 2016 - 2019 Weaviate. All rights reserved. * LICENSE: https://github.com/creativesoftwarefdn/weaviate/blob/develop/LICENSE.md * DESIGN & CONCEPT: Bob van Luijt (@bobvanluijt) * CONTACT: hello@creativesoftwarefdn.org
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildInMemoryContextionaryFromSchema ¶
func BuildInMemoryContextionaryFromSchema(schema schema.Schema, context *libcontextionary.Contextionary) (*libcontextionary.Contextionary, error)
Types ¶
type Contextionary ¶
type Contextionary struct {
contextionary.Contextionary
}
Contextionary composes a regular contextionary with additional schema-related query methods
func New ¶
func New(c contextionary.Contextionary) *Contextionary
New creates a new Contextionary from a contextionary.Contextionary which it extends with Schema-related search methods
func (*Contextionary) SchemaSearch ¶
func (con *Contextionary) SchemaSearch(p SearchParams) (SearchResults, error)
SchemaSearch can be used to search for related classes and properties, see documentation of SearchParams for more details on how to use it and documentation on SearchResults for more details on how to use the return value
type SearchParams ¶
type SearchParams struct { // SearchType can be SearchTypeClass or SearchTypeProperty SearchType SearchType // Name is the string-representation of the class or property name Name string // Keywords (optional). If no keywords are specified, only the class name // will be used as a search query. Keywords models.SemanticSchemaKeywords // Kind as in Thing or Class, not required if SearchType == SearchTypeProperty Kind kind.Kind // Certaintiy must be a value between 0 and 1. The higher it is the narrower // is the search, the lower it is, the wider the search is Certainty float32 }
SearchParams to be used for a SchemaSearch. See individual properties for additional documentation on what they do
func (SearchParams) Validate ¶
func (p SearchParams) Validate() error
Validate the feasibility of the specified arguments
type SearchResult ¶
SearchResult is a single search result. See wrapping Search Results for the Type
type SearchResults ¶
type SearchResults struct { Type SearchType Results []SearchResult }
SearchResults is grouping of SearchResults for a SchemaSearch
type SearchType ¶
type SearchType string
SearchType to search for either class names or property names
const ( // SearchTypeClass to search the contextionary for class names SearchTypeClass SearchType = "class" // SearchTypeProperty to search the contextionary for property names SearchTypeProperty SearchType = "property" )