# Shingles filter with synonym filter?

**URL:** <https://discuss.elastic.co/t/shingles-filter-with-synonym-filter/965>\
**Category:** Elasticsearch\
**Created:** [May 20, 2015, 1:15pm UTC](https://discuss.elastic.co/t/shingles-filter-with-synonym-filter/965 "2015-05-20T13:15:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joshua\_P](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@Joshua\_P](https://discuss.elastic.co/u/Joshua_P)\
**Post date:** [May 20, 2015, 1:15pm UTC](https://discuss.elastic.co/t/shingles-filter-with-synonym-filter/965/1 "2015-05-20T13:15:49Z")

</div>

Hello!

I'm trying to use a shingle filter with the following settings:

```
"my_shingle_filter" : {
    "type" : "shingle",
    "min_shingle_size" : "2",
    "max_shingle_size" : "5",
    "output_unigrams" : "true"
}

```

I have a synonym filter with these settings:

```
"street_synonym" : {
    "type" : "synonym",
    "synonyms_path" : "analysis/synonyms.txt"
},

```

These are used in a custom analyzer:

```
"my_shingle_analyzer" : {
    "type" : "custom",
    "stopwords" : "_english_",
    "filter" : [
        "lowercase",
        "my_shingle_filter",
        "street_synonym"
    ],
    "tokenizer" : "standard"
}

```

When I go to test the analyzer, the synonyms are working, but only for single tokens, not bigrams, trigrams, etc.

`110 5th Avenue` would get expanded to `110`, `110 5th`, `110 5th avenue`, `5th`, `Fifth`, `5th avenue`, `avenue`.

How can set this analyzer up so that I also end up with `110 Fifth` and `Fifth avenue`? Is this even possible? 5th -\> Fifth is in my synonyms file.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:12am UTC](https://discuss.elastic.co/t/shingles-filter-with-synonym-filter/965/3 "2017-07-06T00:12:42Z")

</div>


