# Trouble with a composite \_id

**URL:** <https://discuss.elastic.co/t/trouble-with-a-composite--id/10410>\
**Category:** Elasticsearch\
**Created:** [January 18, 2013, 4:56pm UTC](https://discuss.elastic.co/t/trouble-with-a-composite--id/10410 "2013-01-18T16:56:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JP\_Toto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jp_toto/32/2512_2.png) [@JP\_Toto](https://discuss.elastic.co/u/JP_Toto)\
**Post date:** [January 18, 2013, 4:56pm UTC](https://discuss.elastic.co/t/trouble-with-a-composite--id/10410/1 "2013-01-18T16:56:03Z")

</div>

Hello!

I'm using the CouchDB \_river to stream \_changes from Big Couch to ES  
0.20.2. I'm using full dynamic mapping for the \_river.

The issue is that in CouchDB, we construct \_ids in this fasion:  
"66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701" Sometimes the \_id  
can have dashes (-) as well.

ES doesn't seem to like that \_id setup. All the docs show correctly in the  
index after being copied over by the \_river and the \_id field gets  
populated from the CouchDB \_id. But when I

[http://localhost:9200/index\_test/DeliveryEvent/66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701](http://localhost:9200/index_test/DeliveryEvent/66_DeliveryEventsSpec_messageid0_0_0_20130117T215701)

I get

{  
"\_index": "index\_test",  
"\_type": "DeliveryEvent",  
"\_id": "66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701",  
"exists": false  
}

Is that a limitation of ES or is there a setting where I can make the \_id  
field not analyzed? Any advice would be super. I'm hoping to perform script  
updates on documents but without the \_id working it's difficult.

Thanks!

--

---

<div class="post-metadata">

**Author:** ![egaumer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/egaumer/32/2365_2.png) [@egaumer](https://discuss.elastic.co/u/egaumer)\
**Post date:** [January 18, 2013, 8:12pm UTC](https://discuss.elastic.co/t/trouble-with-a-composite--id/10410/2 "2013-01-18T20:12:19Z")

</div>

Are you sure there's not something else going on? The \_id field doesn't get  
analyzed.

curl -XPUT  
'[http://localhost:9200/index\_test/DeliveryEvent/66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701](http://localhost:9200/index_test/DeliveryEvent/66_DeliveryEventsSpec_messageid0_0_0_20130117T215701)'  
-d '{  
"title":"test",  
"body":"some random data"  
}'

curl -XGET  
'[http://localhost:9200/index\_test/DeliveryEvent/66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701?pretty=1](http://localhost:9200/index_test/DeliveryEvent/66_DeliveryEventsSpec_messageid0_0_0_20130117T215701?pretty=1)'  
{  
"\_index" : "index\_test",  
"\_type" : "DeliveryEvent",  
"\_id" : "66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701",  
"\_version" : 1,  
"exists" : true, "\_source" : {  
"title":"test",  
"body":"some random data"  
}  
}

On Friday, January 18, 2013 11:56:03 AM UTC-5, JP Toto wrote:

> Hello!
> 
> I'm using the CouchDB \_river to stream \_changes from Big Couch to ES  
> 0.20.2. I'm using full dynamic mapping for the \_river.
> 
> The issue is that in CouchDB, we construct \_ids in this fasion:  
> "66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701" Sometimes the \_id  
> can have dashes (-) as well.
> 
> ES doesn't seem to like that \_id setup. All the docs show correctly in the  
> index after being copied over by the \_river and the \_id field gets  
> populated from the CouchDB \_id. But when I
> 
> [http://localhost:9200/index\_test/DeliveryEvent/66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701](http://localhost:9200/index_test/DeliveryEvent/66_DeliveryEventsSpec_messageid0_0_0_20130117T215701)
> 
> I get
> 
> {  
> "\_index": "index\_test",  
> "\_type": "DeliveryEvent",  
> "\_id": "66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701",  
> "exists": false  
> }
> 
> Is that a limitation of ES or is there a setting where I can make the \_id  
> field not analyzed? Any advice would be super. I'm hoping to perform script  
> updates on documents but without the \_id working it's difficult.
> 
> Thanks!

--

---

<div class="post-metadata">

**Author:** ![JP\_Toto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jp_toto/32/2512_2.png) [@JP\_Toto](https://discuss.elastic.co/u/JP_Toto)\
**Post date:** [January 21, 2013, 7:51pm UTC](https://discuss.elastic.co/t/trouble-with-a-composite--id/10410/3 "2013-01-21T19:51:51Z")

</div>

That must be it, then. It's gotta be something in my index. Thanks!

On Friday, January 18, 2013 3:12:19 PM UTC-5, egaumer wrote:

> Are you sure there's not something else going on? The \_id field doesn't  
> get analyzed.
> 
> curl -XPUT '  
> [http://localhost:9200/index\_test/DeliveryEvent/66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701](http://localhost:9200/index_test/DeliveryEvent/66_DeliveryEventsSpec_messageid0_0_0_20130117T215701)'  
> -d '{  
> "title":"test",  
> "body":"some random data"  
> }'
> 
> curl -XGET '  
> [http://localhost:9200/index\_test/DeliveryEvent/66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701?pretty=1](http://localhost:9200/index_test/DeliveryEvent/66_DeliveryEventsSpec_messageid0_0_0_20130117T215701?pretty=1)  
> '  
> {  
> "\_index" : "index\_test",  
> "\_type" : "DeliveryEvent",  
> "\_id" : "66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701",  
> "\_version" : 1,  
> "exists" : true, "\_source" : {  
> "title":"test",  
> "body":"some random data"  
> }  
> }
> 
> On Friday, January 18, 2013 11:56:03 AM UTC-5, JP Toto wrote:
> 
> > Hello!
> > 
> > I'm using the CouchDB \_river to stream \_changes from Big Couch to ES  
> > 0.20.2. I'm using full dynamic mapping for the \_river.
> > 
> > The issue is that in CouchDB, we construct \_ids in this fasion:  
> > "66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701" Sometimes the \_id  
> > can have dashes (-) as well.
> > 
> > ES doesn't seem to like that \_id setup. All the docs show correctly in  
> > the index after being copied over by the \_river and the \_id field gets  
> > populated from the CouchDB \_id. But when I
> > 
> > [http://localhost:9200/index\_test/DeliveryEvent/66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701](http://localhost:9200/index_test/DeliveryEvent/66_DeliveryEventsSpec_messageid0_0_0_20130117T215701)
> > 
> > I get
> > 
> > {  
> > "\_index": "index\_test",  
> > "\_type": "DeliveryEvent",  
> > "\_id": "66\_DeliveryEventsSpec\_messageid0\_0\_0\_20130117T215701",  
> > "exists": false  
> > }
> > 
> > Is that a limitation of ES or is there a setting where I can make the \_id  
> > field not analyzed? Any advice would be super. I'm hoping to perform script  
> > updates on documents but without the \_id working it's difficult.
> > 
> > Thanks!

--

---

<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, 2:55am UTC](https://discuss.elastic.co/t/trouble-with-a-composite--id/10410/4 "2017-07-06T02:55:20Z")

</div>


