12. A computer system configured to publish or discover services in a network, comprising: a first computer device is programmed to: receive a query at a first network node in a distributed network from a querying node, wherein the query includes a first keyword and a second keyword; find a first set of a first number of documents that contain the first keyword by searching a term-frequency table in a memory for the first set of documents having a non-zero entry for a row corresponding to the first keyword; 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; determine a second network node responsible for finding a second set of documents that contain the second keyword based on a hashed second keyword; generate a Bloom filter of the first set comprising an array having the first Bloom filter length and the first number of hash functions; send the first Bloom filter of the first set to the second network node in the distributed network to publish or discover services corresponding to the second set of documents in the network; and return documents consisting of the first set of documents to the querying node; and a second computer device programmed to: find, at the second node, a second set of a second number of documents that contain the second keyword; 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 return documents consisting of the third set of documents to the querying node.
12. A computer system configured to publish or discover services in a network, comprising: a first computer device is programmed to: receive a query at a first network node in a distributed network from a querying node, wherein the query includes a first keyword and a second keyword; find a first set of a first number of documents that contain the first keyword by searching a term-frequency table in a memory for the first set of documents having a non-zero entry for a row corresponding to the first keyword; 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; determine a second network node responsible for finding a second set of documents that contain the second keyword based on a hashed second keyword; generate a Bloom filter of the first set comprising an array having the first Bloom filter length and the first number of hash functions; send the first Bloom filter of the first set to the second network node in the distributed network to publish or discover services corresponding to the second set of documents in the network; and return documents consisting of the first set of documents to the querying node; and a second computer device programmed to: find, at the second node, a second set of a second number of documents that contain the second keyword; 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 return documents consisting of the third set of documents to the querying node. 13. The at least one processor of claim 12 , wherein the query comprises an AND query, and wherein the third module for computing is further configured to compute the first Bloom filter length, L s , for the first set, D1, having a maximum keyword length of b, according to the following equation: L s = (  D ⁢ ⁢ 1  ( ln ⁢ ⁢ 2 ) 2 ⁢ ) * ln ⁡ ( b ⁡ ( ln ⁢ ⁢ 2 ) 2 ) .