# Regarding porter stemming solution

**URL:** <https://discuss.elastic.co/t/regarding-porter-stemming-solution/5871>\
**Category:** Elasticsearch\
**Created:** [November 14, 2011, 10:31pm UTC](https://discuss.elastic.co/t/regarding-porter-stemming-solution/5871 "2011-11-14T22:31:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niranjan](https://avatars.discourse-cdn.com/v4/letter/n/e99b99/32.png) [@Niranjan](https://discuss.elastic.co/u/Niranjan)\
**Post date:** [November 14, 2011, 10:31pm UTC](https://discuss.elastic.co/t/regarding-porter-stemming-solution/5871/1 "2011-11-14T22:31:19Z")

</div>

Hi All,  
I came across Shay Bannon's solution, for enabling porter stemming  
while indexing, at the gist- [https://gist.github.com/879883](https://gist.github.com/879883) . I have  
one more issue for which I have not been able to solve and need help  
on this please. How do I enable the stemming on all the fields? In the  
example given in the gist, stemming happens on title field only.  
Basically, when I construct my search query using XGET, I would like  
to give q=fight instead of q=title:fight and I would like stemming to  
work on the former case. The gist mentions this "searching on \_all  
will not do anystemming, unless also configured on the mapping to be  
stemmed...".  
I tried the following but didn't work:  
curl -XPUT localhost:9200/local -d '{

```
"settings" : {

    "analysis" : {

        "analyzer" : {

            "stem" : {

                "tokenizer" : "standard",

                "filter" : ["standard", "lowercase", "stop",

```

"porter\_stem"]

```
            }

        }

    }

},

"mappings" : {

    "article" : {

        "dynamic" : true,

        "properties" : {

            "_all" : {

                "type" : "string",

                "analyzer" : "stem"

            }

        }

    }

}

```

}'

I changed the title field to \_all field, but it is not working. Would  
appreciate help here.

Thanks,  
Niranjan

---

<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, 3:48am UTC](https://discuss.elastic.co/t/regarding-porter-stemming-solution/5871/2 "2017-07-06T03:48:41Z")

</div>


