added documentation to spex query