# Property “path“=”jast\_name”

**URL:** <https://discuss.elastic.co/t/property-path-jast-name/2942>\
**Category:** Elasticsearch\
**Created:** [May 9, 2010, 5:41am UTC](https://discuss.elastic.co/t/property-path-jast-name/2942 "2010-05-09T05:41:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lenak](https://avatars.discourse-cdn.com/v4/letter/l/96bed5/32.png) [@Lenak](https://discuss.elastic.co/u/Lenak)\
**Post date:** [May 9, 2010, 5:41am UTC](https://discuss.elastic.co/t/property-path-jast-name/2942/1 "2010-05-09T05:41:01Z")

</div>

Hello.  
I tried to work with “path” property and this feature does not work in  
the number of cases.  
May be there is my mistake in request. I am working with example from  
[elasticsearch.com](http://elasticsearch.com)  
Schema definition  
{  
"tweet" : {  
"properties" : {  
"person" : {  
"properties" : {  
"name" : {  
"properties" : {  
"field1" : {  
"type" : "string",  
"path" : "full"  
},  
"field2" : {  
"type" : "string",  
"path" : "full",  
"index\_name" : "field2Index"  
},  
"field3" : {  
"type" : "string",  
"path" : "just\_name"  
},  
"field4" : {  
"type" : "string",  
"path" : "just\_name",  
"index\_name" : "field4Index"  
}  
}  
}  
}  
},  
"message" : {  
"type" : "string"  
}  
}  
}  
}

Indexing request  
curl -XPUT '[http://localhost:9200/141706779/tweet/797949840](http://localhost:9200/141706779/tweet/797949840)' -d '  
{  
"tweet" : {  
"person" : {  
"name" : {  
"field1" : "1",  
"field2" : "2",  
"field3" : "3",  
"field4" : "4"  
},  
"message" : "This is a tweet!"  
}  
}  
}

Search requests:  
curl -XGET '[http://localhost:9200/\_search?q=person.name.field1:1](http://localhost:9200/_search?q=person.name.field1:1)' -  
return hits  
curl -XGET '[http://localhost:9200/\_search?q=person.name.field2:2'-](http://localhost:9200/_search?q=person.name.field2:2'-)  
return hits  
curl -XGET '[http://localhost:9200/\_search?q=person.name.field2Index:](http://localhost:9200/_search?q=person.name.field2Index:)  
2'- return hits  
curl -XGET '[http://localhost:9200/\_search?q=person.name.field3:3'-](http://localhost:9200/_search?q=person.name.field3:3'-)  
return hits  
curl -XGET '[http://localhost:9200/\_search?q=field3:3'-](http://localhost:9200/_search?q=field3:3'-) NO HITS.  
So, I can get result when I write search request with full path and  
field name or index name.  
What is a query to search object by field when field has property  
“path“=”jast\_name” ?

Thanks  
Lena

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 14, 2010, 9:03am UTC](https://discuss.elastic.co/t/property-path-jast-name/2942/2 "2010-05-14T09:03:14Z")

</div>

Hi,

Sorry for the late response. The doc is wrong (it was something that I  
thought about in a "branch", not sure how it got into the docs, I will fix  
it). Basically, the path configuration only applies to object type mapping,  
and applies to all fields within it.

cheers,  
shay.banon

On Sun, May 9, 2010 at 8:41 AM, Lenak [lenakovganov@gmail.com](mailto:lenakovganov@gmail.com) wrote:

> Hello.  
> I tried to work with “path” property and this feature does not work in  
> the number of cases.  
> May be there is my mistake in request. I am working with example from  
> [elasticsearch.com](http://elasticsearch.com)  
> Schema definition  
> {  
> "tweet" : {  
> "properties" : {  
> "person" : {  
> "properties" : {  
> "name" : {  
> "properties" : {  
> "field1" : {  
> "type" : "string",  
> "path" : "full"  
> },  
> "field2" : {  
> "type" : "string",  
> "path" : "full",  
> "index\_name" : "field2Index"  
> },  
> "field3" : {  
> "type" : "string",  
> "path" : "just\_name"  
> },  
> "field4" : {  
> "type" : "string",  
> "path" : "just\_name",  
> "index\_name" : "field4Index"  
> }  
> }  
> }  
> }  
> },  
> "message" : {  
> "type" : "string"  
> }  
> }  
> }  
> }
> 
> Indexing request  
> curl -XPUT '[http://localhost:9200/141706779/tweet/797949840](http://localhost:9200/141706779/tweet/797949840)' -d '  
> {  
> "tweet" : {  
> "person" : {  
> "name" : {  
> "field1" : "1",  
> "field2" : "2",  
> "field3" : "3",  
> "field4" : "4"  
> },  
> "message" : "This is a tweet!"  
> }  
> }  
> }
> 
> Search requests:  
> curl -XGET '[http://localhost:9200/\_search?q=person.name.field1:1](http://localhost:9200/_search?q=person.name.field1:1)' -  
> return hits  
> curl -XGET '[http://localhost:9200/\_search?q=person.name.field2:2'-](http://localhost:9200/_search?q=person.name.field2:2'-)  
> return hits  
> curl -XGET '[http://localhost:9200/\_search?q=person.name.field2Index:](http://localhost:9200/_search?q=person.name.field2Index:)  
> 2'- return hits  
> curl -XGET '[http://localhost:9200/\_search?q=person.name.field3:3'-](http://localhost:9200/_search?q=person.name.field3:3'-)  
> return hits  
> curl -XGET '[http://localhost:9200/\_search?q=field3:3'-](http://localhost:9200/_search?q=field3:3'-) NO HITS.  
> So, I can get result when I write search request with full path and  
> field name or index name.  
> What is a query to search object by field when field has property  
> “path“=”jast\_name” ?
> 
> Thanks  
> Lena

---

<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, 4:24am UTC](https://discuss.elastic.co/t/property-path-jast-name/2942/3 "2017-07-06T04:24:10Z")

</div>


