Annotating URLs with query terms