Quote:
So getting a list of stop words from plugged analyzer implementation by calling an HSearch API is not available at all, right? I would do my own prevalidation check, but need to get stop words list from plugged analyzer impl.
Right that's not available. Keep in mind that not all analyzers have stopwords, and a smart one might have a context-dependent analyzer, for example the "a" token might be considered a stopword depending on its relative position to other tokens; most common implementations aren't that smart but it's an option we should be able to deal with.
Rather than asking the list of stopwords to the framework, I'd add a method to let the framework say if a specific query string has any chance to return some results.. but this is very close in terms of functionality to actually executing the query.
Quote:
hmm, org.hibernate.search.SearchException is general search exception and that swallowing could be tricky for users of an app.
Totally agree, in fact we have a thread on the mailing list in which I proposed to subclass the exception to a specific type for this case. But this is not available in 4.1, so you're right this might be a bad idea until we change that.