# Index word and pdf documents for full-text search

**URL:** <https://www.ruby-forum.com/t/index-word-and-pdf-documents-for-full-text-search/113131>\
**Category:** Rails\
**Created:** [August 27, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/index-word-and-pdf-documents-for-full-text-search/113131 "2007-08-27T22:42:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhfs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b2d939/32.png) [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Post date:** [August 27, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/index-word-and-pdf-documents-for-full-text-search/113131/1 "2007-08-27T22:42:27Z")

</div>

Hello list,

I’m about to start building a document catalog in Rails, and it is  
basically  
a catalog for .doc and .pdf documents. First, I would like to know if  
there  
is anything like lucene for Rails (or Ruby) - maybe a Rails plugin?

Second: It would be nice if the user could search for a term and the  
search  
engine could “look into” the available documents. Would it be possible  
somehow to pre-index word and pdf documents so that they would be  
searchable  
?

Thanks,

Marcelo.

---

<div class="post-metadata">

**Author:** ![mhfs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b2d939/32.png) [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Post date:** [August 27, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/index-word-and-pdf-documents-for-full-text-search/113131/2 "2007-08-27T22:59:30Z")

</div>

Hi Marcelo,

Take a look at acts\_as\_solr

http://acts\_as\_solr.railsfreaks.com/

It provides a simple Rails integration with Solr (a search server  
based on Lucene that includes XML and JSON APIs).

Mike

On Aug 27, 3:41 pm, “Marcelo de Moraes S.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![mhfs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b2d939/32.png) [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Post date:** [August 27, 2007, 11:54pm UTC](https://www.ruby-forum.com/t/index-word-and-pdf-documents-for-full-text-search/113131/3 "2007-08-27T23:54:36Z")

</div>

Hi Mike, thanks for the tip!

---

<div class="post-metadata">

**Author:** ![mhfs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b2d939/32.png) [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Post date:** [August 28, 2007, 11:14am UTC](https://www.ruby-forum.com/t/index-word-and-pdf-documents-for-full-text-search/113131/4 "2007-08-28T11:14:40Z")

</div>

On 8/27/07, Marcelo de Moraes S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello list,
> 
> I’m about to start building a document catalog in Rails, and it is basically  
> a catalog for .doc and .pdf documents. First, I would like to know if there  
> is anything like lucene for Rails (or Ruby) - maybe a Rails plugin?
> 
> Second: It would be nice if the user could search for a term and the search  
> engine could “look into” the available documents. Would it be possible  
> somehow to pre-index word and pdf documents so that they would be searchable  
> ?

As I’m finding out, this is extremely complicated. The search part is  
pretty easy, we are using solr right now for that. The indexing part  
is another matter. We are looking at indexing terabytes of word, pdf,  
html, and whatever other formats we can support. We are storing ms  
documents in pdf, but pdf is hard to index so I’m looking at using  
open office to convert to xml, index it at that point, then convert  
to pdf. So far I haven’t found anything open source that works as  
well as open office for document conversion.

Chris
