NarimanN2/ParsiAnalyzer

Use filters independently

Closed this issue · 2 comments

I need to use each filters inside parsi analyzer independently in a custom analyzer. In fact I need to extend parsi analyzer in custom way. Is there a way to achieve that?

Hi, sorry for the delay.
Please first download the latest version of ParsiAnalyzer. You can use filters independently using their names. There are three token filters called parsi_normalizer, parsi_stem_filter and parsi_stop_filter. also there is a character filter called zwnj_filter. for example if you want to create a ParsiAnalyzer without stemming:

PUT my_index
{
  "settings": {
    "analysis": {
      "analyzer": {
        "parsi_no_stem": {
          "type":      "custom",
          "tokenizer": "standard",
          "char_filter": [
            "zwnj_filter"
         ],
          "filter": [
            "parsi_normalizer",
            "parsi_stop_filter"
          ]
        }
      }
    }
  }
}

Hi, This query it did not work.

Elasticsearch Version: 6.5.0
ParsiAnalyzer Version: 1.0

PUT my_index
{
  "settings": {
    "analysis": {
      "analyzer": {
        "parsi_no_stem": {
          "type": "custom",
          "tokenizer": "standard",
          "filter": [
            "parsi_normalizer",
            "parsi_stop_filter"
          ]
        }
      }
    }
  }
}

This error happened:

Custom Analyzer [parsi_no_stem] failed to find filter under name [parsi_normalizer]

How can I use parsi analyzer with edge_ngram_tokenizer?