1. A data relay apparatus for relaying a packet transmitted, the apparatus comprising: a network processor for outputting, at the time of the packet being inputted, a search request including a plurality of elements in the packet treated as a plurality of search keys and a plurality of pieces of applied mask information each of which indicates an area to be searched by each of the plurality of search keys; a content addressable/associative memory device for storing in advance a plurality of pieces of information to be searched, accepting the search request outputted from the network processor, generating a plurality of search conditions each including a search key and a of piece of applied mask information by analyzing the structure of the search request, searching the plurality of pieces of information to be searched according to each of the search conditions, and outputting a memory address uniquely associated with a detected piece of information to be searched; and a memory device for storing in advance a plurality of candidate search results and outputting a stored candidate search result associated with the memory address outputted from the content addressable/associative memory device as a search result.