lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sara hajili <hajili.s...@gmail.com>
Subject solr auggestion with copy-field
Date Mon, 21 Sep 2015 10:34:49 GMT
hi all
i wanna to get suggestion from multi field in solr.
i add this to solrConfig
<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">mySuggester</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">suggestStr</str>
<str name="weightField">like_count</str>
<str name="suggestAnalyzerFieldType">string</str>
<str name="buildOnStartup">false</str>
</lst>
</searchComponent>
<requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
<lst name="defaults">
<str name="suggest">true</str>
<str name="suggest.count">10</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>

and add this to schema:
<copyField source="*" dest="suggestStr" />
and
<field name="title" type="text_fa" indexed="true" stored="true"
termVectors="true"/>
  <field name="caption" type="text_fa" indexed="true" stored="true"
termVectors="true"/>
  <field name="content" type="text_fa" indexed="true" stored="true"
termVectors="true"/>
 <field name="suggestStr" type="textSuggest" indexed="true" stored="true"
multiValued="true" termVectors="true" />

but i didn't get any result from this suggest query:
http://localhost:8983/solr/post/suggest?suggest=true&suggest.dictionary=mySuggester&wt=json&suggest.q=solr

but when i used one field (not copy field ) i got answer.
how i solve my problem with copy field?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message