In the default /browse suggest, it's wired together with the 'name' field in a 
couple of places:

head.vm:
  'terms.fl': 'name',

suggest.vm:
  #foreach($t in $response.response.terms.name)

I'll aim to make this more dynamic in the future, but for now if you're 
adapting from what's there now to use a different field you'll need to hack 
those two spots.  That second spot is simply a path navigation reference in the 
terms component response that puts the field name as one level in the response 
structure.

So in your example, if you wanted to suggest from 'text', substitute 'text' for 
'name' in the spots just mentioned.

        Erik



On Jan 11, 2013, at 01:21 , anurag.jain wrote:

> in solrconfig.xml 
> 
> 
>       <str name="defType">edismax</str>
>       <str name="qf">
>          text^0.5 last_name^1.0 first_name^1.2 course_name^7.0 id^10.0
> branch_name^1.1 hq_passout_year^1.4
>          course_type^10.0 institute_name^5.0 qualification_type^5.0
> mail^2.0 state_name^1.0
>       </str>
>       <str name="df">text</str>
>       <str name="mm">100%</str>
>       <str name="q.alt">*:*</str>
>       <str name="rows">10</str>
>       <str name="fl">*,score</str>
> 
>       <str name="mlt.qf">
>         text^0.5 last_name^1.0 first_name^1.2 course_name^7.0 id^10.0
> branch_name^1.1 hq_passout_year^1.4
>          course_type^10.0 institute_name^5.0 qualification_type^5.0
> mail^2.0 state_name^1.0
>       </str>
>       <str
> name="mlt.fl">text,last_name,first_name,course_name,id,branch_name,hq_passout_year,course_type,institute_name,qualification_type,mail,state_name</str>
>       <int name="mlt.count">3</int>
> 
> 
>       <str name="facet">on</str>
>       <str name="facet.field">is_top_institute</str>
>       <str name="facet.field">course_name</str>
> 
>       <str name="facet.range">cgpa</str>
>       <int name="f.cgpa.facet.range.start">0</int>
>       <int name="f.cgpa.facet.range.end">10</int>
>       <int name="f.cgpa.facet.range.gap">2</int>
> 
> 
> 
> 
> and in schema.xml
> 
> 
> 
>   <field name="id" type="text_general" indexed="true" stored="true"
> required="true" multiValued="false" /> 
>   <field name="first_name" type="text_general" indexed="false"
> stored="true"/>
>   <field name="last_name" type="text_general" indexed="false"
> stored="true"/>
>   <field name="institute_name" type="text_general" indexed="true"
> stored="true"/>
>    ...
>    ...
>    ...
> 
> 
>    <copyField source="first_name" dest="text"/>
>    <copyField source="last_name" dest="text"/>
>     <copyField source="institute_name" dest="text"/>
>     ...
>     ...
>     ...
> 
> 
> so please now tell me what will be JavaScript (terms.fl parameter) ? and
> conf/velocity/head.vm, and also the 'name' reference in suggest.vm. 
> 
> 
> please reply .. and thanks for previous reply ..  :-)
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Auto-completion-tp4032267p4032450.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to