Can someone point me in the direction of some documentation give me examples that will help implement this.
I am indexing documents in multiple states and want to return the best
match state for the document.
I want a query that says, if there is a document that has a state of
unpublished then use it, otherwise return the published version.
