: With "a?*" I get the documented lucene error : maxClauseCount is set to 1024
Which is why Solr converts PrefixQueries to ConstantScorePrefixQueries that don't have that problem --the trade off being that they can't be highlighted, and we're right back where we started. It's a question of priorities. In developing Solr, we prioritized cosistent stability regardless of query or index characteristics and highlighting of PrefxQueries suffered. Working arround that decision by using Wildcards may get highlighting working for you, but the stability issue of the maxClauseCount is always going to be there (you can increase maxClauseCount in the solrconfig, but there's always the chance the a user will specify a wildcard that results in 1 more clause then you've configured) : I should evaluate RegexQuery. for the record, i don't think that will help ... RegexQuery it works just like WildcardQuery but with a differnet syntax -- it rewrites itself to a BooleanQuery containing all of the Terms in the index that match your regex. -Hoss