#6 new
veerasundaravel

important_words returns values with prefix

Reported by veerasundaravel | February 3rd, 2009 @ 05:04 AM

search = ActsAsXapian::Search.new([Comment], 'article_title:obama', limit => 10) articles = search.results.collect{|x| x[:model]} similar = ActsAsXapian::Similar.new([Comment], articles, :limit => 10)

where,

similar.important_words results the following array,

["obama", "Pelect_obama", "Ppresident", "barack", "Zbarack", "ZAamerica", "ZBelection", "ZCvote"]

Where some of the terms have some prefix like P, Z, ZA, ZB, ZC etc. How can I avoid this, Just I want plain word like, elect, president, barack, america etc.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Xapian full text search plugin for Ruby on Rails.

People watching this ticket

Pages