You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by JoniJnm <rt...@hotmail.com> on 2012/08/07 10:58:39 UTC

Select where in select

Hi!

I'm trying to do a query with a select in another.

I would like to do something like:

select?q=*:* AND id_user=5&fl=id_other

select?q=test AND -id(the result of the other select)

So:

select?q=test AND -id(select?q=* AND id_user=5&fl=id_other)

Is it possible? Or I have to do two separates selects?

$ids = select?q=*:* AND id_user=5&fl=id_other;
$result = select?q=test AND -id(implode(' AND ', $ids))

Thanks!



--
View this message in context: http://lucene.472066.n3.nabble.com/Select-where-in-select-tp3999545.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Select where in select

Posted by "in.abdul" <in...@gmail.com>.
Yes you use filter query ... check filter query .


Syed Abdul kather
send from Samsung S3
On Aug 7, 2012 2:28 PM, "JoniJnm [via Lucene]" <
ml-node+s472066n3999545h21@n3.nabble.com> wrote:

> Hi!
>
> I'm trying to do a query with a select in another.
>
> I would like to do something like:
>
> select?q=*:* AND id_user=5&fl=id_other
>
> select?q=test AND -id(the result of the other select)
>
> So:
>
> select?q=test AND -id(select?q=* AND id_user=5&fl=id_other)
>
> Is it possible? Or I have to do two separates selects?
>
> $ids = select?q=*:* AND id_user=5&fl=id_other;
> $result = select?q=test AND -id(implode(' AND ', $ids))
>
> Thanks!
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
> http://lucene.472066.n3.nabble.com/Select-where-in-select-tp3999545.html
>  To unsubscribe from Lucene, click here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=472066&code=aW4uYWJkdWxAZ21haWwuY29tfDQ3MjA2NnwxMDczOTUyNDEw>
> .
> NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




-----
THANKS AND REGARDS,
SYED ABDUL KATHER
--
View this message in context: http://lucene.472066.n3.nabble.com/Select-where-in-select-tp3999545p3999644.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Select where in select

Posted by Chris Hostetter <ho...@fucit.org>.
: I'm trying to do a query with a select in another.

I'm not 100% sure i understand your question, but i think you want take a 
look at the "join" feature...

http://wiki.apache.org/solr/Join


-Hoss