You don't have to create a new "handler" for this... just do some preprocessing on the resultset that comes back on your first "id:1 OR id:2 OR id:3" query. So - post your query - get the relevant text-nodes from the resultset (XSL-processing is great for that). - Combine the text - Send that text as one query back to Solr
You can build in that logic in your frontend or use some "layer" for this. We (Emid Consult) have created a product that does these things for us we call SEAL. SEAL stands for Search Engine Abstraction Layer (implemented in PHP). The searchengine specific querycooking or performing extra processing for added functionality (like "More like this") is done in that layer. SEAL now can site between the frontend and some search engine (like Solr, Autonomy IDOL or Exalead). On Fri, Jul 31, 2009 at 2:08 PM, Andrew Ingram <a...@andrewingram.net>wrote: > Hi all, > I'm trying various methods of building a user-specific product > recommendation system and one idea is to use solr's MLT functionality. > > For each customer I have a list of items they've bought, and I want to find > similar items that are new to the site. > > The problem is that MLT operates on each result found (if I send it an id, > it will return a list for that id, if I send it lots of ids it will return > a > list for EACH result), what I really want is to return a single list based > on the combined factors of all items return by the initial query. > > So if I search for "id:1 OR id:2 OR id:3", I want the MLT result to be a > single list of items, rather than 3 lists. > > Is this possible without writing a completely new handler? > > Regards, > Andrew Ingram > -- Met vriendelijke groet / Kind regards, Edwin Stauthamer Adviser Search & Collaboration Emid Consult T: +31 (0) 70 8870700 M: +31 (0) 6 4555 4994 E: estautha...@emidconsult.com I: http://www.emidconsult.com