On Mon, Nov 30, 2009 at 1:19 PM, Mark N <nipen.m...@gmail.com> wrote:
> Is it possible to write nested queries in Solr similar to sql like query > where I can take results of the first query and use one or more of its > fields as an argument in the second query. > > That sounds like a join. If so, the answer would be no. > > For example: > > field1:XYZ AND (_query_: field3:{value of field4}) > > This should search for all types of XYZ and then iterate over the result > set > and perform a query for where field3 is equal to the value of field1 from > each item of the first result set. > > Your description is not consistent with the query you have given. If field:XYZ is specified, then what are "types" of XYZ? Also, if you want to perform a query where field3 is equal to the value of field1 then, what is field4 in the query you have given? > this is similar to SQL like query > > > select distinct ( fieldA ) from table where fieldA IN > That sounds similar to faceting. See http://wiki.apache.org/solr/SimpleFacetParameters Perhaps you can give more details on what you want to achieve. -- Regards, Shalin Shekhar Mangar.