Skip to content

FunctionScoreFunctionDescriptor missing filter? #1223

@GaryTurpin

Description

@GaryTurpin

I am trying to add a function to my function score using a filter and weight but filter doesn't seem to be in the Lambda notation.

Query<Document>.FunctionScore(fs => fs.Functions( foo => foo.Filter())) //Doesn't exist

Here is the JSON that I am trying to reproduce in ElasticSearch. Any suggestions on how I can accomplish this?

 "functions": [
                  {
                     "filter": {
                        "query": {
                           "bool": {
                              "should": [
                                 {
                                    "terms": {
                                       "titleid": [
                                          "1056",
                                          "1025"
                                       ]
                                    }
                                 }
                              ]
                           }
                        }
                     },
                     "weight": 10
                  }
]

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