19. The computer program product of claim 16 , wherein the non-transitory computer-readable medium further comprises a fifth set of codes for determining a condition for using or not using the first the Bloom filter for processing queries, wherein the condition comprises when a size of each set, |Dj|, are known apriori, where 1≦j≦q, and where q represents all keywords in the query, and wherein the third set of codes is further configured to compute the first Bloom filter for an OR query only when:  D ⁢ ⁢ 2  ⁢ b - L s - ( 1 - ( 1 - ⅇ -  D ⁢ ⁢ 1  ⁢ r s / L s ) r s ) * (  D ⁢ ⁢ 2  -  D ⁢ ⁢ 1 ⁢ ⋂ D ⁢ ⁢ 2  ) ⁢ b (  D ⁢ ⁢ 1  +  D ⁢ ⁢ 2  ) ⁢ b > η wherein the keywords have a maximum length b and η is a threshold.
16. A computer program product, comprising: a non-transitory computer-readable medium comprising: a first set of codes for causing a computer to receive a query at a first node in a distributed network from a querying node, wherein the query includes a first keyword and a second keyword; a second set of codes for causing the computer to find a first set of a first number of documents that contain the first keyword; a third set of codes for causing the computer to compute an optimal first Bloom filter length and a corresponding first number of hash functions as a function of the first number of documents in the first set; and a fourth set of codes for causing the computer to send a first Bloom filter of the first set to a second node in the distributed network, wherein the second node is identified based on a hashed second keyword, wherein the second node is responsible for finding a set of documents that contain the second keyword, and wherein the first Bloom filter comprises an array having the first Bloom filter length and the first number of hash functions; a fifth set of codes for causing the computer to return documents consisting of the first set of documents to the querying node; a sixth set of codes for causing a second computer to find, at the second node, a second set of a second number of documents that contain the second keyword; a seventh set of codes for causing the second computer to check, at the second node, a membership of each of the documents in the second set over the first Bloom filter to determine a third set of documents that contain the second keyword and are not already present in the first Bloom filter; and a eighth set of codes for causing the second computer to return documents consisting of the third set of documents to the querying node.