Sorry, not sure what you mean by a recreation script. But here is how my index is created and mapped along with the search query
#Create an Index curl -XPUT 'localhost:9200/files #Create index mapping enabling _source and disabling _all fields #Without the store property set to true, no results are returned curl -XPUT /files/rawfiles/_mapping -d '{ "rawfiles": { "_source": { "enabled": true }, "_all": { "enabled": false }, "_timestamp": { "enabled": true, "path": "timestamp" }, "properties": { "fileid": { "store": true, "index": "not_analyzed", "omit_norms": true, "type": "string" }, "userid": { "store": true, "index": "not_analyzed", "omit_norms": true, "type": "string" }, "filesize": { "store": true, "index": "not_analyzed", "type": "long" }, "filename": { "store": true, "omit_norms": true, "index_analyzer": "def_analyzer", "search_analyzer": "def_analyzer_search", "type": "string" }, "extension": { "analyzer": "keyword", "store": true, "omit_norms": true, "type": "string" }, "modificationdate": { "store": true, "index": "not_analyzed", "type": "date" }, "timestamp": { "store": true, "index": "not_analyzed", "type": "date" }, "category": { "store": true, "index": "not_analyzed", "type": "long" }, "content_ukw": { "analyzer": "def_analyzer", "store": true, "omit_norms": true, "type": "string" }, "content_br": { "analyzer": "br_analyzer", "store": true, "omit_norms": true, "type": "string" }, "content_da": { "analyzer": "da_analyzer", "store": true, "omit_norms": true, "type": "string" }, "content_de": { "analyzer": "de_analyzer", "store": true, "omit_norms": true, "type": "string" }, "content_en": { "analyzer": "en_analyzer", "store": true, "omit_norms": true, "type": "string" }, "content_es": { "analyzer": "es_analyzer", "store": true, "omit_norms": true, "type": "string" } } } }' #After indexing some data, do a search query curl -XPOST /files/rawfiles/_search -d '{ "from": 0, "size": 50, "sort": [ { "_score": { "order": "desc" } } ], "fields": [ "filename", "filesize" ], "aggs": { "extension": { "terms": { "field": "extension" } }, "pagecount": { "terms": { "field": "pagecount" } }, "dates": { "date_range": { "field": "modificationdate", "format": "MM-yyyy", "ranges": [ { "from": "now-1M/M", "to": "now", "key": "one_month" }, { "from": "now-3M/M", "to": "now-1M/M", "key": "three_months" }, { "from": "0", "to": "now-3M/M", "key": "old" } ] } } }, "query": { "multi_match": { "query": "retracted", "fields": [ "filename^3", "content_*^2", "content_ukw" ] } } }' #No hits will be returned without setting the store property to true for filename and content fileds On Tuesday, April 21, 2015 at 1:59:33 PM UTC+3, David Pilato wrote: > > I don’t understand. Could you GIST a full recreation scripts which > demonstrate what you are seeing? > > > > -- > *David Pilato* - Developer | Evangelist > *elastic.co <http://elastic.co>* > @dadoonet <https://twitter.com/dadoonet> | @elasticsearchfr > <https://twitter.com/elasticsearchfr> | @scrutmydocs > <https://twitter.com/scrutmydocs> > > > > > > Le 21 avr. 2015 à 12:50, Zaid Amir <redse...@gmail.com <javascript:>> a > écrit : > > Hi, > > I am having issues with ES. I have configured ES to store the _source > field, however when I query I do not get any hits unless I "store" the > fields that I want to query. This is how my query request looks like: > > { > "from": 0, > "size": 50, > "sort": [ > { > "_score": { > "order": "desc" > } > } > ], > "fields": [ > "filename", > "filesize" > ], > "aggs": { > "extension": { > "terms": { > "field": "extension" > } > }, > "pagecount": { > "terms": { > "field": "pagecount" > } > }, > "dates": { > "date_range": { > "field": "modificationdate", > "format": "MM-yyyy", > "ranges": [ > { > "from": "now-1M/M", > "to": "now", > "key": "one_month" > }, > { > "from": "now-3M/M", > "to": "now-1M/M", > "key": "three_months" > }, > { > "from": "0", > "to": "now-3M/M", > "key": "old" > } > ] > } > } > }, > "query": { > "multi_match": { > "query": "some string", > "fields": [ > "filename^3", > "content_*^2", > "content_ukw" > ] > } > } > } > > > Unfortunately without storing the filename and the content_ fileds, I do > not get any results and ES returns no hits. > > -- > 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 elasticsearc...@googlegroups.com <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/4aeb3736-ba27-4934-b655-15b53d14b8a1%40googlegroups.com > > <https://groups.google.com/d/msgid/elasticsearch/4aeb3736-ba27-4934-b655-15b53d14b8a1%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9139d0cb-58e3-482e-add6-b0bf0e4b58a9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.