Solr Suggester only adding first value from multivalued fields to suggest dictionary -
Solr Suggester only adding first value from multivalued fields to suggest dictionary -
i'm using solr suggest component homecoming suggestions field stored multivalued. problem: first entry of multivalued field documents added dictionary database.
<searchcomponent name="suggest" class="solr.suggestcomponent"> <lst name="suggester"> <str name="name">suggestskill</str> <str name="lookupimpl">org.apache.solr.spelling.suggest.jaspell.jaspelllookupfactory</str> <!-- org.apache.solr.spelling.suggest.fst --> <str name="dictionaryimpl">documentdictionaryfactory</str> <!-- org.apache.solr.spelling.suggest.highfrequencydictionaryfactory --> <str name="field">skills</str> <str name="weightfield">skills</str> <str name="storedir">/usr/share/solr/live/solr/collection1/suggest/</str> <str name="suggestanalyzerfieldtype">string</str> <str name="buildoncommit">true</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> <str name="suggest.dictionary">suggestskill</str> </lst> <arr name="components"> <str>suggest</str> </arr> </requesthandler>
imagine next documents:
"docs": [ { "id": "100444001", "firstname": "piet", "lastname": "huysentruyt", "skills": [ "mongodb", "angularjs", "java serverpages", "mongodb", "angularrd" ], "_version_": 1482216060554838000 }, { "id": "104444", "firstname": "bomas", "lastname": "banciaux", "skills": [ "bower", "front-end engineering" ], "_version_": 1482216060556935200 }]
when searching skill suggestions, bower , mongo available in /suggest field. after suggest.build command. thoughts?
update: of version 5 of solr, suggester works multivalued fields
solr
Comments
Post a Comment