: 1. Query for a set of terms against a field - : 2. do a second query on the results of the first query for the terms : that did not match in the first query against another field.
i'm a little confused as to what exactly the point of this would be ... mainly because phrases like "query on the results of the first query" are vague ... it's also not clear what "terms that did not match" are ... if i search for "foo:bar foo:baz" and get back two documents, one containing foo:bar and one containing foo:baz then does that mean all the "terms matched", or that none of the terms matched (since none of them were in *all* the documents returned ... are you attempting to narrow the results further in the second query (ie: get fewer hits) or just get "better" scoring? my gut tells me that what you are trying to do is get a list of all "documents" that contain some words in an important field, and then add to that a list of all documents that match on the same word in a less important field, possibly in such a way that documents containing the word in both fields only get credit for hte important one... ...but i could just be reading a lot into your question since this is something i do all the time ... take a look at the DisMax handler and the Relevancy FAQ... http://wiki.apache.org/solr/SolrRelevancyFAQ http://wiki.apache.org/solr/DisMaxRequestHandler -Hoss