Keyword based search


#1

I’m new to DataSift apis and trying to understand what would be the best approach for the following scenario.

I have some entity on our side that tries to search by some keywords - lets say K1 - source twitter
My CSDL would look something like
twitter.text contains "K1"
Lets say that I compile this CSDL and store the hash
I now create a Push to get Live Stream using
push/create and mention a destination of say “http”

While this is going on, another entity on our side is trying to create another search for K2

My new CSDL -
twitter.text contains “K2”

Now instead of creating another Push for this CSDL (as the number of keyword search could be rising on our side), I plan to create a Master CSDL and the Push is always based on this Master CSDL so that the Push is not affected.

So, I plan to do something like
Master CSDL -
tag “C1” {stream : “hash1”} //from the first keyword K1 CSDL compile
tag “C2” {stream : “hash2”} //from the first keyword K2 CSDL compile
tag “C3” {stream : “hash3”} //from the first keyword K3 CSDL compile…


tag “CN” {stream : “hashN”} //from the first keyword K3 CSDL compile

return {
   stream "hash1" or
   stream "hash2" or
  stream "hash3" or 
  ....
  ....
  stream "hashN" }

and then create only One Push
push/create using Master CSDL

Would this be the right approach?


#2

Either writing your CSDL the way you described, or creating a Push subscription for each entity will work. One Push subscription per entity may be easier to manage, and code, though there is a limit of 200 active Push subscriptions per DataSift user account.


#3

Thanks for the reply Jason. Is 200 Active/Paused Push Subscription applicable to all types of Account(Free vs Paid)?


#4

Thanks for the reply Jason. Is 200 Active/Paused Push Subscription applicable to all types of Account(Free vs Paid)?


#5

Yes, the limit is the same and applies to any DataSift account, whether it is a Basic account or a subscription account.