开发者

Make Zend Search Lucene more "sensitive"

I was wondering if someone knows what I need to do to make Zend Search more sensitive. Currently, say开发者_开发问答 I am searching for the word:

Penelope

from my index, I need to type in the entire word in order to get a match. What I'm after is that when I type 'P' it immediately returns relevant results for content having words beginning with 'P'.

I am using the standard

$index->find('Penelope');

Do I need to use the query builder to achieve this, or am I missing something obvious?

Thanks


According to the lucene documentation, you can use wildcards. ? for single character wildcards, and * for multicharacter wildcards. try something like this.

$index->find('Pe*');

More info here: http://framework.zend.com/manual/en/zend.search.lucene.query-language.html

If this is what you are looking for, please select the check mark next to this answer. Thanks!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜