PromptCloud Search API

The search API can be queried using various logical combinations, specified via the "q" parameter. Below are the other parameters and sample queries

	s -> size (response size i.e. no of records by default it gives max 20 records)
	t -> unix time-stamp (gives result after the given time-stamp)
		

To search in all fields:

	http://search.promptcloud.com/api/v1/search?id=demo&q=(dairy)&format=html
	http://search.promptcloud.com/api/v1/search?id=demo&q=(dairy)&format=pretty_json
		
*Note* - &format=pretty_json and &format=html are given mainly to make it look better in browsers. While making calls to the search api from your programs please drop that param. To the query above when called from a program should be
	http://search.promptcloud.com/api/v1/search?id=demo&q=(dairy)
		

To search in a given field :

http://search.promptcloud.com/api/v1/search?id=demo&q=(FieldName:FieldValue)
eg:
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in)&format=html
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in)&format=pretty_json
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in)&s=30&format=html 
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in)&s=30&format=pretty_json 
		
Boolean queries : ( note %20 given below was encoded by browser for space)
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in%20AND%20author_name:NLManoj)&format=html
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in%20AND%20author_name:NLManoj)&format=pretty_json
		
Example query for after time-stamp
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in)&format=html&t=1402827196
		

Sort query:

To sorting on single field (by default it sort in descending order)
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in)&format=html&sortby=index_time
		
To sort in ascending order
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in)&format=html&sortby=index_time&order=asc
		
To add multiple sort filter
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in)&format=html&sort_fltr=timestamp:asc,index_time:desc
		

Range-Query:

To get result between the dates
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in)&format=html&date_range=20140609-20140615
		
To get result after the given date
	http://search.promptcloud.com/api/v1/search?id=demo&q=(source:consumercomplaints.in)&format=html&date_range=20140609