Skip to content

[Querqy] How can we add different analyzer for the query and the matching field in Querqy query? #172

@rakeshroshann-ai

Description

@rakeshroshann-ai

I’m looking for some help. How can we apply a different analyzer for the query and the matching field?

query analyzer: default_synonym
field analyzer: default

Without querqy:

{
  "multi_match": {
    "query": "{{query}}",
    "operator": "or",
    "minimum_should_match": "-24%",
    "type": "cross_fields",
    "analyzer": "default_synonym",
    "tie_breaker": 0.7,
    "fields": ["keywords^10", "name.default^5"]
  }
}

with Querqy:

{
  "querqy": {
    "matching_query": {
      "query": "{{query}}"
    },
    "query_fields": ["keywords^10", "name.default^5"],
    "rewriters": ["replace", "common_rules"],
    "minimum_should_match": "-24%",
    "tie_breaker": 0.7
  }
}

querqy version: querqy-elasticsearch-1.7.es8171.0

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