Fixed incorrect application of ToLowerInvariant()

Sort field should be lowercased when creating the Lucene Sort object,
not when checking if the string has a value.
Merge branch 'add-lucene-sort-parameter'