Re: [fw-general] Lucene Partial matching

2007-07-10 Thread Peter Farafonov
Hello, Greg.

> In Zend Search Lucene is it possible for query terms to partially match?
> Like Happy* matching Happyness


There are two ways to skin this cat.

1. Stemming - reducing a word to it's constant part, so that "happ" +
any combination of "-less", "-ness", "-ly", "-er", etc would match.
Note that you don't use wildcards in queries, matching happens
automatically.

Stemming is presently supported and stemmer filters are available for
many languages.

2. Actual wildcard queries are not yet implemented, but if (having
considered stemming) you still really need one, you can make quick
and dirty version on your own.

I've made it this way. I extract full terms dictionary (array), filter
it for everything that matches "term*", and re-run query as "(term1 OR
term2 OR termN). Not very effective, but takes only 2 or 3 lines of
code.

-- 
Best regards,
 Peter  mailto:[EMAIL PROTECTED]



Re: [fw-general] Lucene Partial matching

2007-07-09 Thread Greg Freeman

The reason I ask if that the stuff I'm indexing can have 'tags' associated
with it. I'm wondering the best way to store tags in a lucene index. Could
it be put in a space separated unstored field?
-- 
View this message in context: 
http://www.nabble.com/Lucene-Partial-matching-tf4052773s16154.html#a11511785
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Lucene Partial matching

2007-07-09 Thread Greg Freeman

In Zend Search Lucene is it possible for query terms to partially match?

Like Happy* matching Happyness
-- 
View this message in context: 
http://www.nabble.com/Lucene-Partial-matching-tf4052773s16154.html#a11511660
Sent from the Zend Framework mailing list archive at Nabble.com.