github.com/weaviate/weaviate@v1.24.6/adapters/handlers/graphql/local/get/sparse_search.go (about) 1 // _ _ 2 // __ _____ __ ___ ___ __ _| |_ ___ 3 // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ 4 // \ V V / __/ (_| |\ V /| | (_| | || __/ 5 // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| 6 // 7 // Copyright © 2016 - 2024 Weaviate B.V. All rights reserved. 8 // 9 // CONTACT: hello@weaviate.io 10 // 11 12 package get 13 14 import ( 15 "fmt" 16 17 "github.com/tailor-inc/graphql" 18 ) 19 20 func bm25Argument(className string) *graphql.ArgumentConfig { 21 prefix := fmt.Sprintf("GetObjects%s", className) 22 return &graphql.ArgumentConfig{ 23 Type: graphql.NewInputObject( 24 graphql.InputObjectConfig{ 25 Name: fmt.Sprintf("%sHybridGetBm25InpObj", prefix), 26 Fields: bm25Fields(prefix), 27 }, 28 ), 29 } 30 } 31 32 func bm25Fields(prefix string) graphql.InputObjectConfigFieldMap { 33 return graphql.InputObjectConfigFieldMap{ 34 "query": &graphql.InputObjectFieldConfig{ 35 Description: "The query to search for", 36 Type: graphql.String, 37 }, 38 "properties": &graphql.InputObjectFieldConfig{ 39 Description: "The properties to search in", 40 Type: graphql.NewList(graphql.String), 41 }, 42 } 43 }