views:

59

answers:

2

Hi, I don't understand the way zend search lucene is working.

The index returns nothing when i'm typing words in singular. Whereas when they are in plural, it matches.

video = nothing. videos = it works.

i tried different words and i don't arrive to search a part of words.

Regards

A: 

I thought. I just have to add a wildcard. and it's ok. Sorry for that stupid question lol

DarKA
A: 

For the benefit of anybody who finds this and is still looking for an answer, you would do the following for a query string called $query_str $hits = $index->find($query_str.'*');

You might also want to try a "fuzzy search" to accomplish your goal. You can read about the query types here: http://framework.zend.com/manual/en/zend.search.lucene.query-language.html

You can also build the queries using the API: http://framework.zend.com/manual/en/zend.search.lucene.query-api.html

jeffp