blevesearch / bleve-explorer

An example app providing an HTTP/REST/JSON front-end to bleve
121 stars 29 forks source link

Get all the documents in an Index #10

Open DNadar opened 8 years ago

DNadar commented 8 years ago

Is there any Rest API to load all the Documents Present in the Index file.

Currently, i am indexing the Document (in all 25 document) and on search i am able to get the Corresponding Documents in the Search text input.

How to load the entire Document (all 25 document) irrespective of any text search.

mschoch commented 8 years ago

See https://github.com/blevesearch/bleve/blob/master/query_match_all.go#L24-L26

mschoch commented 8 years ago

Sorry I didn't realize you'd created 2 issues. The UI doesn't support doing it directly, but the rest API supports the match_all query. See https://github.com/blevesearch/bleve/blob/master/query.go#L212

Just create a query object with "match_all": {}