Re: Joins or subselects in solr
Thanks for the advice. Glad you like the site! Yes, we are using the new multi-select support to do this. At first, we wrote our own client- side solution to allow for multi-select which was super complex but moved to the built-in solr support as soon as we found it. Excellent feature! -Nasseam Solr-powered Ajax search+nav: http://factbook.bodukai.com/ Powered by Boutique: http://bodukai.com/boutique/ On Jun 14, 2009, at 8:16 AM, Yonik Seeley wrote: On Fri, Jun 12, 2009 at 6:43 PM, Nasseam Elkarra wrote: I am storing items in an index. Each item has a comma separated list of related items. Is it possible to bring back an item and all of its related items in one query? If so how and how would you distinguish between which one is the main item and which are the related. You would currently need a custom query component to do this... not sure if it's worth it vs two requests. Solr-powered Ajax search+nav: http://factbook.bodukai.com/ Cool, nice multi-select! Are you using Solr's new multi-select support to do this? -Yonik http://www.lucidimagination.com
Re: Joins or subselects in solr
Nasseam Elkarra schrieb: I am storing items in an index. Each item has a comma separated list of related items. Is it possible to bring back an item and all of its related items in one query? If so how and how would you distinguish between which one is the main item and which are the related. Think about the data structure. You're saying there is a main item, which suggests there is some regularity to the underlying data structure, possibly a tree. If there is a main item, each item should store a reference to the main item. You could then perform a lookup specifying q=mainitem:12345. That would retrieve all items related to 12345 and solve the problem more efficiently than having each item store a list of all its related items. I'm thinking of small or moderately sized trees here, such as they grow in mailing lists or discussion boards. If it's not a tree, but some less regular graph, then the notion of a "main item" needs clarification. Michael Ludwig
Re: Joins or subselects in solr
On Fri, Jun 12, 2009 at 6:43 PM, Nasseam Elkarra wrote: > I am storing items in an index. Each item has a comma separated list of > related items. Is it possible to bring back an item and all of its related > items in one query? If so how and how would you distinguish between which > one is the main item and which are the related. You would currently need a custom query component to do this... not sure if it's worth it vs two requests. > Solr-powered Ajax search+nav: > http://factbook.bodukai.com/ Cool, nice multi-select! Are you using Solr's new multi-select support to do this? -Yonik http://www.lucidimagination.com
Re: Joins or subselects in solr
Hi Nasseam, You might be able to do this with the MoreLikeThis capability, but I'm not 100% sure. It would likely take some custom work as well. -Grant On Jun 12, 2009, at 6:43 PM, Nasseam Elkarra wrote: Hello, I am storing items in an index. Each item has a comma separated list of related items. Is it possible to bring back an item and all of its related items in one query? If so how and how would you distinguish between which one is the main item and which are the related. Any help is much appreciated. Thanks! Nasseam Solr-powered Ajax search+nav: http://factbook.bodukai.com/ Powered by Boutique: http://bodukai.com/boutique/ -- Grant Ingersoll http://www.lucidimagination.com/ Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using Solr/Lucene: http://www.lucidimagination.com/search
Joins or subselects in solr
Hello, I am storing items in an index. Each item has a comma separated list of related items. Is it possible to bring back an item and all of its related items in one query? If so how and how would you distinguish between which one is the main item and which are the related. Any help is much appreciated. Thanks! Nasseam Solr-powered Ajax search+nav: http://factbook.bodukai.com/ Powered by Boutique: http://bodukai.com/boutique/