Reputation: 8560
I have a Lucene index which:
I have a requirement to sort search results by Title and Tag fields. At the moment, if none of the documents in the index contain Tag field, the search throws an SystemException
: "field "Tag" does not appear to be indexed".
I am aware this behaviour is by design.
Is there a way to tell Lucene to optionally sort by Tag field if it exists?
Upvotes: 0
Views: 406
Reputation: 15673
What I'd do here is add another field that is concatenated title and tags and then sort by that -- should get you what you want and you'll still be able to ride the lucene rails.
Upvotes: 1