: In my web application I want to set up auto-suggest as you type : functionality which will search case-insensitively yet return the original : case terms. It doesn't seem like TermsComponent can do this as it can only : return the lowercase indexed terms your are searching against, not the ... : which provides useful sorting by and returning of term frequency counts in : your index. How does one get this same information with regular Solr Query? : I set up the following prefix query, searching by the indexed lowercased : field and returning the other:
The type of approach you are describing (doing a prefix based query for autosuggest) probably won't work very well unless your index is 100% designed just for the autosuggest ... if it's an index about products, and you're just using one of hte fields for autosuggest, you aren't going to get good autosuggest results because the same word is going to appear in multiple products. what you need is an index of *words* that you want to autosuggest, with fields indicating how important those words are that you can use in a function query (this replaces the term freq that TermComponent would use) the fact that your "test" field is multivalued and stores widly different things in each doc is an example of what i mean. Have you considered the possibility of just indexing the lowercase value concatenated with the regular case value using a special delimiter, and ten returning to your TermComponent based solution? index "PowerPoint" as "powerpoint|PowerPoint" and just split on the "\" character when you get hte data back from your prefix based term lookup. -Hoss