Learning to rank user queries to detect search tasks