Query-log mining for detecting spam