Added functionality to search using facets to return and selected facets.

I have added the functionality to include both the facets to return and the selected facets in the search method.
This is the first pull-request that I have ever created so my apologies if I have got it wrong! I think I have managed to commit the correct version finally.
This line is missing a semicolon.