# Problem with document metadata: index document from fs river

**URL:** <https://discuss.elastic.co/t/problem-with-document-metadata-index-document-from-fs-river/11447>\
**Category:** Elasticsearch\
**Created:** [April 4, 2013, 10:21am UTC](https://discuss.elastic.co/t/problem-with-document-metadata-index-document-from-fs-river/11447 "2013-04-04T10:21:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yahia](https://avatars.discourse-cdn.com/v4/letter/y/d9b06d/32.png) [@yahia](https://discuss.elastic.co/u/yahia)\
**Post date:** [April 4, 2013, 10:21am UTC](https://discuss.elastic.co/t/problem-with-document-metadata-index-document-from-fs-river/11447/1 "2013-04-04T10:21:43Z")

</div>

hi all

j'indexe mes documents en utilisant fs river,

i user the folowing index:

curl -XPUT '[http://localhost:9200/mydocs/](http://localhost:9200/mydocs/)' -d '{  
"settings" : {"index" : {"analysis" :  
{"analyzer" : {  
"synfromfile" : {"tokenizer" : "whitespace","filter" : ["synonym"]},  
"autocomplete" : {"tokenizer" : "whitespace","filter" :  
["lowercase","engram"]}},  
"filter" : {"synonym" : {"type" : "synonym", "synonyms\_path" :  
"C:\TempElasticSearch\synonym\synonyms.txt"},  
"engram" : {"type" : "edgeNGram","min\_gram" : 3,"max\_gram" : 10}}}}}}'

the folowing mapping

curl -XPUT '[http://localhost:9200/mydocs/doc/\_mapping](http://localhost:9200/mydocs/doc/_mapping)' -d '  
{"doc" : {  
"properties" : {  
"file" : { "type" : "attachment",  
"path" : "full",  
"fields" : {"file" : {"type" : "string","store" : "yes","term\_vector" :  
"with\_positions\_offsets","analyzer" : "synfromfile"},  
"author" : {"type" : "string"},  
"title" : {"type" : "string","store" : "yes"},  
"date" : {"type" : "date","format" : "dateOptionalTime"},  
"keywords" : {"type" : "string"},  
"content\_type" : {"type" : "string" }}},  
"name" : {"type" : "string","analyzer" : "autocomplete"},  
"pathEncoded" : {"type" : "string"},  
"postDate" : {"type" : "date","format" : "dateOptionalTime"},  
"rootpath" : {"type" : "string"},  
"virtualpath" : { "type" : "string"}}}}'

and the folowing river

curl -XPUT 'localhost:9200/\_river/Myfs\_river/\_meta' -d '{  
"type": "fs",  
"fs": {  
"name": "fs river",  
"url": "C:\TempElasticSearch\tempDoc",  
"update\_rate": 180000,  
"includes": ["_.doc" , "_.docx", "_.xls", "_.pdf", "\*.txt"]},  
"index": { "index": "mydocs","type": "doc"}  
}'

but when looking through a document keyword (search for a word that exists  
in the content of a document) metadata of the documents returned does not  
contain the field author !!!!

i use the folowing query:

TermsFacetBuilder fb = FacetBuilders.termsFacet(TERMS\_FACET\_F).field(  
TYPE\_FIELD);  
QueryBuilder queryBuilder = QueryBuilders.queryString(keyword);  
SearchResponse searchHits = esClient.prepareSearch()  
.setIndices(INDEX\_NAME)  
.setSearchType(SearchType.DFS\_QUERY\_THEN\_FETCH).addFacet(fb)  
.setFrom(query.getStart()).setSize(query.getRow())  
.setQuery(queryBuilder).addHighlightedField(NAME\_FIELD)  
.addHighlightedField(FILE\_FIELD).setHighlighterOrder(SCORE)  
.execute().actionGet();

return searchHits;

and i have this result : looking for "application" key world

{  
"took" : 1133,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 3,  
"max\_score" : 0.078125,  
"hits" : [ {  
"\_index" : "mydocs",  
"\_type" : "doc",  
"\_id" : "19943db2a847cbb66daf35446bab775",  
"\_score" : 0.078125, "\_source" :  
{"name":"ElasticSearch.docx","postDate":1365068589756,"pathEncoded":"8580d27817ab2e7da7fd9c55a54c81cc","rootpath":"8580d27817ab2e7da7fd9c55a54c81cc","virtualpath":"c","file":{"\_name":"ElasticSearch.docx","content":"KLMN......  
"highlight" : {  
"file" : [ "notre application se fait  
dans le fichier application-context comme suit :\n\<bean  
id="esClient"\n\t\tclass="fr", "comme une application distribuée et répartit la charge entre les  
nœuds.\nIndexe :\nAu moment ou en crée un" ]  
}  
}, {  
"\_index" : "mydocs",  
"\_type" : "doc",  
"\_id" : "33711747ec838172ca777eba396127",  
"\_score" : 0.078125, "\_source" :  
{"name":"ElasticSearch1.docx","postDate":1365069178174,"pathEncoded":"8580d27817ab2e7da7fd9c55a54c81cc","rootpath":"8580d27817ab2e7da7fd9c55a54c81cc","virtualpath":"c","file":{"\_name":"ElasticSearch1.docx","content":"UEs....  
"highlight" : {  
"file" : [ "notre application se fait  
dans le fichier application-context comme suit :\n\<bean  
id="esClient"\n\t\tclass="fr", "comme une application distribuée et répartit la charge entre les  
nœuds.\nIndexe :\nAu moment ou en crée un" ]  
}  
} ]  
},  
"facets" : {  
"f" : {  
"\_type" : "terms",  
"missing" : 0,  
"total" : 3,  
"other" : 0,  
"terms" : [ {  
"term" : "doc",  
"count" : 3  
} ]  
}  
}  
}

I do not know where the problem lies !!!!

Cordially

Yahia

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:42am UTC](https://discuss.elastic.co/t/problem-with-document-metadata-index-document-from-fs-river/11447/2 "2017-07-06T02:42:49Z")

</div>


