I'm working on using Solr for autocompleting usernames. I'm running into a
problem with the wildcard queries (e.g. username:al*).

We are tokenizing usernames so that a username like "solr-user" will be
tokenized into "solr" and "user", and will match both "sol" and "use"
prefixes. The problem is when we get "solr-u" as a prefix, I'm having to
split that up on the client side before I construct a query "username:solr*
username:u*". I'm basically using a regex as a poor man's tokenizer.

Is there a better way to approach this? Is there a way to tell Solr to
tokenize a string and use the parts as prefixes?

- Hayden

Reply via email to