Commands: Querying: How to stream query results?

Use StreamQuery method to stream results of a selected index according to a specified query.


IEnumerator<RavenJObject> StreamQuery(
	string index,
	IndexQuery query,
	out QueryHeaderInformation queryHeaderInfo);
index string A name of an index to query
query IndexQuery A query definition containing all information required to query a specified index.
queryHeaderInfo QueryHeaderInformation Information about performed query
Return Value
IEnumerator<RavenJObject> Enumerator with query results
QueryHeaderInformation Information about performed query


QueryHeaderInformation queryHeaderInfo;
IEnumerator<RavenJObject> enumerator = store
		new IndexQuery
			Query = "Company:companies/1"
		out queryHeaderInfo);

while (enumerator.MoveNext())
	RavenJObject order = enumerator.Current;