github.com/weaviate/weaviate@v1.24.6/usecases/modulecomponents/additional/rank/rank_params_extractor.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 rank 13 14 import ( 15 "github.com/tailor-inc/graphql/language/ast" 16 ) 17 18 func (p *ReRankerProvider) parseReRankerArguments(args []*ast.Argument) *Params { 19 out := &Params{} 20 21 for _, arg := range args { 22 switch arg.Name.Value { 23 case "query": 24 out.Query = &arg.Value.(*ast.StringValue).Value 25 case "property": 26 out.Property = &arg.Value.(*ast.StringValue).Value 27 } 28 } 29 30 return out 31 }