Wildcard searching and highlighting with Solr 1.4

江枫思渺然 提交于 2019-11-29 02:19:36

From what I know you can't use wildcards with the dismax handler, see http://wiki.apache.org/solr/DisMaxRequestHandler#q.

To simulate wildcard searching I used EdgeNGrams following some of the instructions here: http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/. Actually I really only added the edgytext fieldtype to schema.xml and changed the fieldtype of the field I wanted to search.

Hope this helps!

Or you can grab the latest nightly build and use edismax (ExtendedDismaxQParser).

It handles both trailing and leading wildcards.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!