Search elasticsearch all content from especific source -
i want know if possible search content specific _source in elasticsearch.
for example have this:
{ "_shards":{ "total" : 5, "successful" : 5, "failed" : 0 }, "hits":{ "total" : 1, "hits" : [ { "_index" : "twitter", "_type" : "tweet", "_id" : "1", "_source" : { "user" : "kimchy", "postdate" : "2009-11-15t14:12:12", "message" : "trying out elastic search" } } ] }
}
i want query users source without specifying name.
for eg: similar in sql this
select * user twitter
and give users
thanks , sorry bad english
edit: want search source. give example, have source store random word, store, not. want search source when have new words.
the plan verify last 10 minutes if in specific source have new, if not, don't care
you can just:
$ curl -xget 'http://localhost:9200/twitter/_search'
that default return 10
documents. can sipecify size
:
$ curl -xget 'http://localhost:9200/twitter/_search?size=bignum'
or can use scrool
: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html
Comments
Post a Comment