Certainly if you come up with a general solution, the whole community will be *very* interested <G>.....
On Wed, Feb 17, 2010 at 11:14 AM, Daniel Shane <sha...@lexum.umontreal.ca>wrote: > Yup, thats also what I was thinking. > > However, I do think that many real world examples cannot simply use one > flat index. If you have a big index with big documents, you may want to have > a separate, small index, for things that update frequently etc.. You would > need to cross reference that index with the main one to produce the final > result. > > It java it would be easy to just do 2 queries, one to get the main hits, > and the other to get the smaller index. In fact, that controller could just > cache those entries in the second index. > > I don't know if it would be easy to include in Solr. It would certainly > require much thought tough as some may want to cross index another core for > each hit, while others would just want to retrive a bunch of documents > statically. > > Daniel Shane > > I'll see what could be done, but I don't think anything easy > ----- Original Message ----- > From: "Erick Erickson" <erickerick...@gmail.com> > To: solr-user@lucene.apache.org > Sent: Tuesday, February 16, 2010 10:20:50 PM > Subject: Re: Merge several queries into one result? > > It's generally a bad idea to try to think of > various SOLR/Lucene indexes in a database-like > way, Lucene isn't built to do RDBMS-like stuff. The > first suggestion is usually to consider flattening > your data. That would be something like > adding NY and "New York" in each document. > > If that's not possible, the thread titled "Collating results from multiple > indexes" might be useful, although my very quick > read of that is that you have to do some custom work... > > HTH > Erick > > > On Tue, Feb 16, 2010 at 4:54 PM, Daniel Shane <sha...@lexum.umontreal.ca > >wrote: > > > Hi all! > > > > I'm trying to join 2 indexes together to produce a final result using > only > > Solr + Velocity Response Writer. > > > > The problem is that each "hit" of the main index contains references to > > some common documents located in another index. For example, the hit > could > > have a field that describes in what state its located. This field would > have > > a value of "NY" for New York etc... > > > > Now what if, in velocity, I want to show this information in full detail. > > Instead of the NY, I would like to show "New York"? This information has > not > > been indexed in the main index, but rather in a second one. > > > > Is it possible to coalesce or join these results together so that I can > > pass a simple Velocity template to generate the final HTML? > > > > Or do I have to write a webapp in java to cache all these global > variables > > (the state codes, the country codes etc...)? > > > > Daniel Shane > > >