# Not Analyzed Field jdbc river

**URL:** <https://discuss.elastic.co/t/not-analyzed-field-jdbc-river/2612>\
**Category:** Elasticsearch\
**Created:** [June 13, 2015, 2:06am UTC](https://discuss.elastic.co/t/not-analyzed-field-jdbc-river/2612 "2015-06-13T02:06:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitex](https://avatars.discourse-cdn.com/v4/letter/k/f14d63/32.png) [@kitex](https://discuss.elastic.co/u/kitex)\
**Post date:** [June 13, 2015, 2:06am UTC](https://discuss.elastic.co/t/not-analyzed-field-jdbc-river/2612/1 "2015-06-13T02:06:44Z")

</div>

I am trying to make some field not analyzed in jdbc river but this code doesn't seem to work:

```
PUT /_river/performance/_meta
{
    "type" : "jdbc",
    "jdbc" : {
        "url" : "jdbc:postgresql://localhost:5432/testdb",
        "user" : "test",
        "password" : "test#",
        "locale" : "en_US",
        "sql" : "SELECT * from test",
       "elasticsearch" : {
             "cluster" : "realtime",
             "host" : "localhost",
             "port" : 9300
        },
        "index" : "performance",
        "type" : "perf1",
         "schedule": "0 0/1 * * * ?",
        "index_settings" : {
            "index" : {
                "number_of_shards" : 1
            }
        },
        "type_mapping": {
		 "perf1" : {
                  "properties" : {
                       "bsc" : { 
                            "type" : "string",
                            "index" : "not_analyzed"
                       }                       
                  }
              }
            
        }
    }
}

```

Is my mapping not correct?

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [June 13, 2015, 1:15pm UTC](https://discuss.elastic.co/t/not-analyzed-field-jdbc-river/2612/2 "2015-06-13T13:15:05Z")

</div>

I read somewhere that Rivers are being Deprecated, I have not read up on rivers to be much help with your configuration.  
You may want to just create a template separate from your config.

I put mine in the ES\_HOME/conf/templates/name.json

[https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html)

Also you might have an "Order" issue where another template has , check to see what the template is being applied to your index

Hope this helps you

---

<div class="post-metadata">

**Author:** ![kitex](https://avatars.discourse-cdn.com/v4/letter/k/f14d63/32.png) [@kitex](https://discuss.elastic.co/u/kitex)\
**Post date:** [June 15, 2015, 12:35am UTC](https://discuss.elastic.co/t/not-analyzed-field-jdbc-river/2612/3 "2015-06-15T00:35:07Z")

</div>

As i need to pull data from rdbms i don't have other alternative than rivers which are simple. I have not made template yet. I think the mapping type should have done the magic as I have other geo field which works.

---

<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:07am UTC](https://discuss.elastic.co/t/not-analyzed-field-jdbc-river/2612/4 "2017-07-06T00:07:34Z")

</div>


