Kibana discover does not appear to list empty documents

Is that correct? - I'm (experimenting with) creating empty documents just as flags that the IDs exist: I can see these documents with a search, so my software will work OK, but they don't seem to appear in Kibana's "discover" page?

Hi @TimWard,

there are a few reasons why this might happen. The first that comes to mind is, that if your index pattern is configured as time-based with a time field, Kibana will implicitly include a time range in every query. Any documents that don't have the configured time field will then be excluded from the result set, because they don't match the query criteria. Could you check whether that is the case?

It's not a time-based index and Kibana (as far as I can tell) doesn't think it is.

Ok, good to know. In that case it might be helpful to take a look at the requests being sent. They show up as _msearch requests in the network panel of your browser's developer tools. If you could paste them here or attach a HAR file of the request, I could try to find clues in there.

{
	"index": ["analyser"],
	"ignore_unavailable": true,
	"preference": 1510134031978
}{
	"version": true,
	"size": 500,
	"sort": [{
		"_score": {
			"order": "desc"
		}
	}],
	"query": {
		"query_string": {
			"analyze_wildcard": true,
			"query": "*"
		}
	},
	"_source": {
		"excludes": []
	},
	"stored_fields": ["*"],
	"script_fields": {
		
	},
	"docvalue_fields": [],
	"highlight": {
		"pre_tags": ["@kibana-highlighted-field@"],
		"post_tags": ["@/kibana-highlighted-field@"],
		"fields": {
			"*": {
				"highlight_query": {
					"query_string": {
						"analyze_wildcard": true,
						"query": "*",
						"all_fields": true
					}
				}
			}
		},
		"fragment_size": 2147483647
	}
}

I can't see anything in that query that would exclude empty documents. If you perform the following request, does the hits.total match the number of documents including the empty ones or are they missing from that number as well?

POST /analyser/_search
{
  "version": true,
  "size": 0,
  "sort": [{
    "_score": {
      "order": "desc"
    }
  }],
  "query": {
    "query_string": {
      "analyze_wildcard": true,
      "query": "*"
    }
  },
  "_source": {
    "excludes": []
  },
  "stored_fields": ["*"],
  "script_fields": {
    
  },
  "docvalue_fields": [],
  "highlight": {
    "pre_tags": ["@kibana-highlighted-field@"],
    "post_tags": ["@/kibana-highlighted-field@"],
    "fields": {
      "*": {
        "highlight_query": {
          "query_string": {
            "analyze_wildcard": true,
            "query": "*",
            "all_fields": true
          }
        }
      }
    },
    "fragment_size": 2147483647
  }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.