I’m not saying that you need to send all your data. But to send one document at least which is supposed to match. So then we can play with your script and try to fix it.
-- David Pilato - Developer | Evangelist elastic.co @dadoonet <https://twitter.com/dadoonet> | @elasticsearchfr <https://twitter.com/elasticsearchfr> | @scrutmydocs <https://twitter.com/scrutmydocs> > Le 21 avr. 2015 à 14:33, Zaid Amir <redserpe...@gmail.com> a écrit : > > If by data you mean the indexing calls, then I'm afraid they are too big to > be any relevant. Also not sure what this could help with since I have no > issues with creating, mapping or indexing data. As I said, what happens is > once I change my fields' 'store' property to false, my queries stop returning > hits. setting the 'store' property for the fields back to true will make it > work. Both are done with the _source field enabled. > > On Tuesday, April 21, 2015 at 3:10:56 PM UTC+3, David Pilato wrote: > A full script is closed to what you sent. > > Data are just missing here. > Also, could you use GIST to post it? > > > > -- > David ;-) > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs > > Le 21 avr. 2015 à 13:54, Zaid Amir <redse...@gmail.com <javascript:>> a écrit > : > >> 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 <>> 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 <>. >>> 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 >>> <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 elasticsearc...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elasticsearch/9139d0cb-58e3-482e-add6-b0bf0e4b58a9%40googlegroups.com >> >> <https://groups.google.com/d/msgid/elasticsearch/9139d0cb-58e3-482e-add6-b0bf0e4b58a9%40googlegroups.com?utm_medium=email&utm_source=footer>. >> For more options, visit https://groups.google.com/d/optout >> <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 > <mailto:elasticsearch+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/46d991a4-21f5-4e04-8d9c-37c31e7a63e7%40googlegroups.com > > <https://groups.google.com/d/msgid/elasticsearch/46d991a4-21f5-4e04-8d9c-37c31e7a63e7%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <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/EDABC984-649D-443F-B4EC-7D1A96B34DBE%40pilato.fr. For more options, visit https://groups.google.com/d/optout.