Reputation: 7846
After follow request
POST http://192.168.36.235:9200/object_folder666_integration_debug/_doc?pretty=true&error_trace=true HTTP/1.1
Accept: application/json
Content-Type: application/json
10.0.18362; .NET Framework 4.8.4010.0; Nest)
Host: 192.168.36.235:9200
Content-Length: 1325
{/* -object content- */}
I've got 201 response and it's looks like a doc has been indexed.
HTTP/1.1 201 Created
Location: /object_folder666_integration_debug/_doc/d99jLXUBNoTXVKywvedm
content-type: application/json; charset=UTF-8
content-length: 267
{
"_index" : "object_folder666_integration_debug",
"_type" : "_doc",
"_id" : "d99jLXUBNoTXVKywvedm",
"_version" : 1,
"result" : "created",
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"_seq_no" : 0,
"_primary_term" : 1
}
But when I perform a second query (search) I've got a 0 hits and not idea whats wrong.
Request:
http://192.168.36.235:9200/object_folder666_integration_debug/_search?size=10000
Response:
{"took":3,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":0,"relation":"eq"},"max_score":null,"hits":[]}}
Request:
http://192.168.36.235:9200/object_folder666_integration_debug/_settings
Response:
{"object_folder666_integration_debug":{"settings":{"index":{"search":{"slowlog":{"threshold":{"fetch":{"warn":"1s"}}}},"refresh_interval":"-1","number_of_shards":"1","provided_name":"object_folder666_integration_debug","merge":{"policy":{"max_merge_at_once":"10"}},"max_result_window":"2147483647","creation_date":"1602790714822","analysis":{"filter":{"word_delimeter":{"split_on_numerics":"false","generate_word_parts":"false","type":"word_delimiter","preserve_original":"true","generate_number_parts":"false"},"eng_stemmer":{"type":"snowball"}},"analyzer":{"whitespace_word_delimeter":{"filter":["lowercase","word_delimeter"],"type":"custom","tokenizer":"whitespace"},"default":{"filter":["lowercase","eng_stemmer"],"type":"custom","tokenizer":"standard"},"whitespace":{"filter":["lowercase"],"type":"custom","tokenizer":"whitespace"},"not_analyzed_lowercase":{"filter":["lowercase"],"type":"custom","tokenizer":"keyword"}}},"number_of_replicas":"0","uuid":"BoIlI0VYSLSi7-8ioaEGtg","version":{"created":"7090299"}}}}}
Upvotes: 1
Views: 870
Reputation: 217494
The problem is that the refresh interval of your index is set to -1, which means no automatic refresh ever, unless you manually do it.
So you have two options:
A. You keep it that way, but after each indexation, you need to run this in order to refresh your index
GET http://192.168.36.235:9200/_refresh
B. You decide to change that and let your index refresh more regularly, the default being every second, by running this only once
PUT GET http://192.168.36.235:9200/object_folder666_integration_debug/_settings
{
"index.refresh_interval": "1s"
}
Upvotes: 3