|
Mulitple Indexes or one big index??: msg#00098lang.ruby.ferret.general
I was wondering, is it better to maintain one large index or several smaller indexes? I am allowing users to upload files whose corresponding data is subsequently parsed and indexed. The problem is that each of these documents has different fields (which the user defines) and this makes searching and displaying search results slightly difficult. I tried to attach a unique ID to each file indexed and then conduct a search within the documents that have the proper ID, but this failed. My code: all_databases=OtherDatabase.find(:all) all_databases.each do |dbase| index.search_each('id:("#{dbase.id}) *:(*'+"#{@phrase}"+'*)', :limit=>100) do |doc, score| @scores << score # add score to score array @init_results << index[doc].load # end end My solution to this would be to just have many indexes (eventually these may number in the hundreds) each stored in its own unique directory and then open, search, and close each index as needed. Is this a good idea? Any input would really help, Thanks -- Posted via http://www.ruby-forum.com/. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Getting "ArgumentError ( isn't a valid directory argume: 00098, Jens Kraemer |
|---|---|
| Next by Date: | Re: Getting "ArgumentError ( isn't a valid directory argume: 00098, Dave To |
| Previous by Thread: | Getting "ArgumentError ( isn't a valid directory argument.i: 00098, Dave To |
| Next by Thread: | Re: Mulitple Indexes or one big index??: 00098, William Morgan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |