Yeah, I don't believe there's any good way to do it in Solr 1.4.

You can make two queries, first make your 'sub' query, get back the list of values, then construct the second query where you do "{!field v=field_name} val1 OR val2 OR val3 .... OR valN"

Kind of a pain, and there is a maximum number of conditions you can have in there (1024 maybe?).

It is OFT requested behavior, and the feature on SOLR-2272 is very exciting to me and I think would meet a lot of needs, but I haven't tried it yet myself.

Jonathan

On 1/4/2011 2:03 PM, Steven A Rowe wrote:
Hi Barani,

I haven't tried it myself, but the limited JOIN functionality provided by 
SOLR-2272 sounds very similar to what you want to do:

    https://issues.apache.org/jira/browse/SOLR-2272

Steve

-----Original Message-----
From: bbarani [mailto:bbar...@gmail.com]
Sent: Tuesday, January 04, 2011 1:27 PM
To: solr-user@lucene.apache.org
Subject: Sub query using SOLR?


Hi,

I am trying to use subquery in SOLR, is there a way to implement this
using
SOLR query syntax?

Something like

Related_id: IN query(field=ud, q=”type:IT AND manager_12:dave”)

The thing I really want is to use output of one query to be the input of
another query.

Not sure if it is possible to use the query() function (function query)
for
my case..

Just want to know if ther is a better approach...

Thanks,
Barani
--
View this message in context: http://lucene.472066.n3.nabble.com/Sub-
query-using-SOLR-tp2193251p2193251.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to