No hits if fields are not stored

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4aeb3736-ba27-4934-b655-15b53d14b8a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I don’t understand. Could you GIST a full recreation scripts which demonstrate what you are seeing?

--
David Pilato - Developer | Evangelist

@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 21 avr. 2015 à 12:50, Zaid Amir redserpent7@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 elasticsearch+unsubscribe@googlegroups.com mailto:elasticsearch+unsubscribe@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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2B522B56-1928-48E2-89BA-15792D5E1B33%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

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+unsubscribe@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.

A full script is closed to what you sent.

Data are just missing here.
Also, could you use GIST to post it?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 21 avr. 2015 à 13:54, Zaid Amir redserpent7@gmail.com 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
@dadoonet | @elasticsearchfr | @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.
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+unsubscribe@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.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/7BEBCF17-8F44-42EC-88F0-8BDB6C9403DA%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

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 :wink:
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.

--
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.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/46d991a4-21f5-4e04-8d9c-37c31e7a63e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 21 avr. 2015 à 14:33, Zaid Amir redserpent7@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 :wink:
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+unsubscribe@googlegroups.com mailto:elasticsearch+unsubscribe@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+unsubscribe@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.

This is an index request that I have taken out of my _bulk request. Hope it
helps:

curl -XPOST http://localhost:9200/_bulk -d '{
"index" : {
"_index" : "files",
"_type" : "rawfiles",
"_id" : "130741557032361573_equilibrating"
}
}{
"content_br" : ,
"content_da" : ,
"content_de" : ,
"content_en" : ["monism lasagnes beginner prepositional masterworks prince
diluvium suggesting maharishi raceways quibble debauches virtuosity spurt
narrater squads entranced iron latents beguiler delimitating banders
creosoting stained macular protested russet whists cooling hoc
resuscitation yukking pea oglers puffins covertly divulgement listless
evince levitate crowded dandyism jeu prewashes blackened queenlier
effeminate prorater remarriage nails sunk landowner"],
"content_es" : ,
"content_ukw" : ,
"fileid" : "130741557032361573_equilibrating",
"userid" : "123456",
"filesize" : "102633",
"filename" : "130741557032361573_equilibrating.txt",
"extension" : "txt",
"modificationdate" : "2015-04-22T08:55:03.1969749+03:00",
"timestamp" : "2015-04-22T05:55:03.5139749Z",
"category" : 0
}'

On Tuesday, April 21, 2015 at 5:08:56 PM UTC+3, David Pilato wrote:

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 http://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 <redse...@gmail.com <javascript:>> 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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 21 avr. 2015 à 13:54, Zaid Amir redse...@gmail.com 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.

--
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/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.

--
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/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.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1f4e34ac-fcad-4c2a-adc8-2893ce6c0503%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.