In short, no. The problem is that faceting is working by counting documents with distinct tokens in the field. So in your example I'd expect you to see facets for "toys", "for", "children". All it has to work with are the tokens, the fact that the original input was three words is completely lost at this point.
You could index these with keywordTokenizer and facet on _that_ field, which would work in this case. I don't know how well that would fit into the rest of your app though. Best Erick On Mon, Oct 29, 2012 at 8:03 AM, Grzegorz Sobczyk <grzegorz.sobc...@contium.pl> wrote: > Hi. > Is there any solution to facet documents with specified prefix on some > tokenized field, but in result gets the original value of a field? > > e.q.: > <field name="category_ac" type="text_autocomplete" indexed="true" > stored="true" multiValued="true" /> > > <fieldType name="text_autocomplete" class="solr.TextField"> > <analyzer> > <tokenizer class="solr.StandardTokenizerFactory" /> > <filter class="solr.LowerCaseFilterFactory" /> > </analyzer> > </fieldType> > > > Indexed value: "toys for children" > query: > q=&start=0&rows=0&facet.limit=-1&facet.mincount=1&f.category_ac.facet.prefix=chi&facet.field=category_ac&facet=true > > I'd like to get exacly "toys for children", not "children" > > -- > Grzegorz Sobczyk