It can be done by extending LuceneQParser/SolrQueryParser see http://wiki.apache.org/solr/SolrPlugins#QParserPlugin there is newTermQuery(Term) it should be overridden and delegate to newPrefixQuery() method. Overall, I suggest you consider to use EdgeNGramTokenFilter in index time, and then search by plain termqueries.
On Tue, Jul 23, 2013 at 2:05 PM, Paul Blanchaert <p...@amosis.eu> wrote: > My client has an installation with 3 different clients using the same Solr > index. These clients all append a * wildcard suffix in the query: user > enters "abc def" while search is performed against (abc* def*). > In order to move away from this way of searching, we'd like to move the > clients away from this wildcard search at the moment we implement a new > index. However, at that time, the client apps will still need to use this > wildcard suffix search. So the goal is to have the wildcard search option > "to append * suffix when not yet set" configurable on server side. > I thought a tokenizer would do the work, but as the wildcard searches are > detected before analyzers do the work, this is not an option. > Can I enable this without coding? Or should I use a (custom) functionquery > or custom search handler? > Any thought is appreciated. > > > ----- > Kind regards, > > Paul Blanchaert > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <mkhlud...@griddynamics.com>