The context field can only be set at configuration-time for the AnalyzingInfixSuggester (FYI: CONTEXTS_FIELD_NAME refers to the field in Lucene index that is internally maintained by the suggester and does not reflect any field in user's index). The context field can be specified and fed into the suggester using DocumentDictionary, DocumentValueSourceDictionary etc, (the support for contexts in FileDictionary is not there yet).
The context-aware functionality is not yet exposed to Solr. There were attempts made to make Analyzing/FuzzySuggester to be context-aware (LUCENE-5350; patch might be outdated), but its still not in trunk (see jira discussion). Hope that helps, Areek On Fri, Mar 28, 2014 at 3:47 AM, Alan Woodward <a...@flax.co.uk> wrote: > Hi all, > > I have a few of questions about the context-aware AnalyzingInfixSuggester: > - is it possible to choose a specific field for the context at runtime > (say, I want to limit suggestions by a field that I've already faceted on), > or is it limited to the hardcoded CONTEXTS_FIELD_NAME? > - is the context-aware functionality exposed to Solr yet? > - how difficult would it be to add similar functionality to the other > suggesters, if say I only wanted to do prefix matching? > > Thanks, > > Alan Woodward > www.flax.co.uk > > >