A system for real-time search in a messaging platform, comprising: one or more networked computer systems comprising computer processors; a search fanout module implemented on a first computer system of the networked computer systems; a plurality of partitions, implemented on a second computer system of the networked computer systems, wherein at least one of the partitions comprises: a real-time search engine; a set of segments, each segment comprising a postings list of document identifiers for messages posted to the messaging platform, wherein the messages include at least one term, wherein a document identifier is a unique identifier for a message; a query cache comprising one or more cached segments mapped to at least one of the segments, the query cache comprising query cache binary attribute values that indicate, for each of the messages referenced by the document identifiers in the postings list of said at least one of the segments, whether the message has an attribute wherein each real-time search engine is configured to: receive in parallel with other partitions in the plurality of partitions, a search term and a binary attribute; obtain, from a set of postings lists, document identifiers for messages that include the search term and have the attribute, wherein the searched term is not searched in the content of messages for which the query cache binary attribute value indicates that the referenced message does not have the attribute; and provide the obtained document identifiers to the search fanout module, wherein the search fanout module is configured to: receive at least one document identifier from at least one of the plurality of partitions; and return, in response to the search query, said at least one document identifier for messages containing the search term and having the attribute. one or more networked computer systems comprising computer processors; a search fanout module implemented on a first computer system of the networked computer systems; a plurality of partitions, implemented on a second computer system of the networked computer systems, wherein at least one of the partitions comprises: a real-time search engine; a set of segments, each segment comprising a postings list of document identifiers for messages posted to the messaging platform, wherein the messages include at least one term, wherein a document identifier is a unique identifier for a message; a query cache comprising one or more cached segments mapped to at least one of the segments, the query cache comprising query cache binary attribute values that indicate, for each of the messages referenced by the document identifiers in the postings list of said at least one of the segments, whether the message has an attribute a real-time search engine; a set of segments, each segment comprising a postings list of document identifiers for messages posted to the messaging platform, wherein the messages include at least one term, wherein a document identifier is a unique identifier for a message; a query cache comprising one or more cached segments mapped to at least one of the segments, the query cache comprising query cache binary attribute values that indicate, for each of the messages referenced by the document identifiers in the postings list of said at least one of the segments, whether the message has an attribute wherein each real-time search engine is configured to: receive in parallel with other partitions in the plurality of partitions, a search term and a binary attribute; obtain, from a set of postings lists, document identifiers for messages that include the search term and have the attribute, wherein the searched term is not searched in the content of messages for which the query cache binary attribute value indicates that the referenced message does not have the attribute; and provide the obtained document identifiers to the search fanout module, receive in parallel with other partitions in the plurality of partitions, a search term and a binary attribute; obtain, from a set of postings lists, document identifiers for messages that include the search term and have the attribute, wherein the searched term is not searched in the content of messages for which the query cache binary attribute value indicates that the referenced message does not have the attribute; and provide the obtained document identifiers to the search fanout module, wherein the search fanout module is configured to: receive at least one document identifier from at least one of the plurality of partitions; and return, in response to the search query, said at least one document identifier for messages containing the search term and having the attribute.