# Again search engine question

**URL:** <https://www.ruby-forum.com/t/again-search-engine-question/113507>\
**Category:** Rails\
**Created:** [August 31, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/again-search-engine-question/113507 "2007-08-31T23:11:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![demoversion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4491bb/32.png) [@demoversion](https://www.ruby-forum.com/u/demoversion)\
**Post date:** [August 31, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/again-search-engine-question/113507/1 "2007-08-31T23:11:35Z")

</div>

Hello, who can tell me how i make a search engine that satisfy following  
requiments:

1. support for UTF-8
2. search by part of word, example: dem\* \<- returns demo, demon,  
demor…
3. UTF-8 search ignoring case sensitive symbols, for example when word  
start with ‘Ð«’ and other starts with ‘Ñ‹’, and  
i searching by criteria ‘Ñ‹’ - I get only last word.
4. easy configurable and reliable

Thank you all

---

<div class="post-metadata">

**Author:** ![demoversion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4491bb/32.png) [@demoversion](https://www.ruby-forum.com/u/demoversion)\
**Post date:** [September 1, 2007, 4:50am UTC](https://www.ruby-forum.com/t/again-search-engine-question/113507/2 "2007-09-01T04:50:03Z")

</div>

This is not a trivial question, or you could just search Google for  
it. Some parts may already be built, but I suspect you’ll have to do  
a fair amount of invention on your own.

Given that you’re using Rails, I assume you’re searching elements  
that are in a database. You might look at any of the number of full  
text search components that are available for rails (acts\_as\_solr,  
acts\_as\_ferret). I don’t know the extent to which any of these  
handle UTF-8, word stemming, etc., so you might have to implement  
something yourself.

-faisal

---

<div class="post-metadata">

**Author:** ![demoversion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4491bb/32.png) [@demoversion](https://www.ruby-forum.com/u/demoversion)\
**Post date:** [September 1, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/again-search-engine-question/113507/3 "2007-09-01T12:08:28Z")

</div>

> Given that you’re using Rails, I assume you’re searching elements  
> that are in a database. You might look at any of the number of full  
> text search components that are available for rails (acts\_as\_solr,  
> acts\_as\_ferret). I don’t know the extent to which any of these  
> handle UTF-8, word stemming, etc., so you might have to implement  
> something yourself.

Unfortunately ferret can’t provide search for UTF-8 symbols(for english  
symbols it does).

One plugin - acts\_as\_fulltext\_indexed - provide search by UTF-8 but i  
get a problems with upper/downcase symbols.

---

<div class="post-metadata">

**Author:** ![demoversion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4491bb/32.png) [@demoversion](https://www.ruby-forum.com/u/demoversion)\
**Post date:** [September 1, 2007, 9:51pm UTC](https://www.ruby-forum.com/t/again-search-engine-question/113507/4 "2007-09-01T21:51:47Z")

</div>

On Sep 1, 3:08 am, “Igor K.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## One plugin - acts\_as\_fulltext\_indexed - provide search by UTF-8 but i get a problems with upper/downcase symbols.

look at iconv:

t = Iconv.new(‘ASCII//TRANSLIT’, ‘utf-8’).iconv(inputstring)

or Ferret’s LowerCaseFilter

[http://rubyforge.org/pipermail/ferret-talk/2007-August/003887.html](http://rubyforge.org/pipermail/ferret-talk/2007-August/003887.html)
