# Grammer + query\_string with fuzzy '~'

**URL:** https://discuss.elastic.co/t/grammer-query-string-with-fuzzy/127594
**Category:** Elasticsearch
**Created:** [April 11, 2018, 9:23am UTC](https://discuss.elastic.co/t/grammer-query-string-with-fuzzy/127594 "2018-04-11T09:23:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![N\_M\_10](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@N\_M\_10](https://discuss.elastic.co/u/N_M_10)
#### Post date: [April 11, 2018, 9:23am UTC](https://discuss.elastic.co/t/grammer-query-string-with-fuzzy/127594/1 "2018-04-11T09:23:04Z")

</div>

my mapping (part of it)

```
"exact": {
      "filter": [
        "lowercase",
        "my_snow", //grammer
        "my_stop" //stopwords
      ],
      "tokenizer": "standard",
      "type": "custom"
    }

```

Note: exact is search\_analyzer and analyzer.

my query

> {  
> "query": {  
> "query\_string": {  
> "query": "trending",  
> "fields": [
> 
> ```
> "exact"
> ],
> 
> ```

> ```
> "default_operator": "and"      
> }
> 
> ```
> 
> }  
> }

while indexing: word trending token: trend  
while searching: word trending token: trend  
comment : i am getting document which has trending word in it.

but when i search like  
while indexing: word trending~ token: trend  
while searching: word trending~ token: trend  
comment: i am not getting any result.

---

<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: [May 9, 2018, 9:23am UTC](https://discuss.elastic.co/t/grammer-query-string-with-fuzzy/127594/2 "2018-05-09T09:23:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
