Thanks Areek.  So looking at the code in trunk, exposing it to Solr looks to be 
pretty straightforward - just extending DocumentDictionaryFactory to take a 
'contextField' parameter as well, and passing that on to the DocumentDictionary 
constructor.  I'll give it a go!

Thanks again.

Alan Woodward
www.flax.co.uk


On 29 Mar 2014, at 22:29, Areek Zillur wrote:

> 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
>> 
>> 
>> 

Reply via email to