Build :
(1) input a document and the mappings of all words in .
(2) specified according to the functionality.
(3) output a local functional structure .
Filter :
(1) input a set of encrypted document , the corresponding local functional
 structures , and the mappings of the queried keywords .
(2) specified according to the functionality.
(3) output a subset of the documents .
Algorithm 1: Template for functional component: FC.