A computer apparatus for searching encrypted data stored in a database using a Boolean query, wherein the apparatus is configured to: receive a search query comprising a plurality of Boolean literals each comprising a variable or a negated variable, wherein the occurrence of a variable indicates that a query data item corresponding to the variable is to be included, and the occurrence of a negated variable indicates that a query data item corresponding to the variable is not to be included, each query data item being one of a finite set of possible data items; analyze the search query to determine a Boolean expression type of the search query among a group of predefined Boolean expression types comprising at least one of: query normal form, QNF, disjunctive normal form, DNF, conjunctive normal form, CNF, and OTHER; calculate a vector single query from the search query with a vector element for each of the possible data items having a value representing a data item of the search query according to the 15 determined Boolean expression type of the search query; encrypt the vector single query; transmit the encrypted vector single query to a server, wherein the server applies the encrypted vector single query to search over an encrypted index of a database of documents to create an encrypted result, wherein the encrypted index maps each of the finite set of possible data items to at least one document in which the respective data item is found and wherein the encryption is performed using an encryption method supporting a homomorphic encryption function that calculates a vector inner product of encrypted data, to allow searching by calculation of the vector inner product of the encrypted vector single query and the encrypted index; receive from the server the encrypted result; and decrypt the result to identify at least one document stored in the database of the server satisfying the search query, wherein the QNF defines the search query according to: L 1 #... # L k; wherein L j, for j = 1,..., k, denotes a Boolean literal, and # denotes logical AND or logical OR, wherein each variable of the Boolean literals appears at most once. receive a search query comprising a plurality of Boolean literals each comprising a variable or a negated variable, wherein the occurrence of a variable indicates that a query data item corresponding to the variable is to be included, and the occurrence of a negated variable indicates that a query data item corresponding to the variable is not to be included, each query data item being one of a finite set of possible data items; analyze the search query to determine a Boolean expression type of the search query among a group of predefined Boolean expression types comprising at least one of: query normal form, QNF, disjunctive normal form, DNF, conjunctive normal form, CNF, and OTHER; calculate a vector single query from the search query with a vector element for each of the possible data items having a value representing a data item of the search query according to the 15 determined Boolean expression type of the search query; encrypt the vector single query; transmit the encrypted vector single query to a server, wherein the server applies the encrypted vector single query to search over an encrypted index of a database of documents to create an encrypted result, wherein the encrypted index maps each of the finite set of possible data items to at least one document in which the respective data item is found and wherein the encryption is performed using an encryption method supporting a homomorphic encryption function that calculates a vector inner product of encrypted data, to allow searching by calculation of the vector inner product of the encrypted vector single query and the encrypted index; receive from the server the encrypted result; and decrypt the result to identify at least one document stored in the database of the server satisfying the search query, wherein the QNF defines the search query according to: L 1 #... # L k; wherein L j, for j = 1,..., k, denotes a Boolean literal, and # denotes logical AND or logical OR, wherein each variable of the Boolean literals appears at most once.