for sake of completeness, here is the same query w/o fq q=+{!parent which=type_s:parent}search_t:item1 +{!parent which=type_s:parent}search_t:item2 -{!parent which=type_s:parent}search_t:item3
here is more detail about the first symbol magic http://www.mail-archive.com/solr-user@lucene.apache.org/msg96796.html On Mon, Apr 7, 2014 at 1:23 PM, mertens <lmert...@gmail.com> wrote: > Thanks Hoss, with the filter queries it works. I was trying to use a normal > query from Mikhail's blog that looked like this: > > q={!parent which=type_s:parent}+search_t:item1 +search_t:item2 > -search_t:item3 > > That query doesn't work for me but the filter query does just what I want. > > ps last years stump the chump was great, and it looks like you're still not > stumped. > > Cheers, > Luke > > > On Thu, Apr 3, 2014 at 1:39 AM, Chris Hostetter-3 [via Lucene] < > ml-node+s472066n4128734...@n3.nabble.com> wrote: > > > > > : Thanks for your response. Here is an example of what I'm trying to do. > > If I > > : had the following documents: > > > > what you are attempting is fairly trivial -- you want to query for all > > parent documents, then kapply 3 filters: > > > > * parent of a child matching item1 > > * parent of a child matching item2 > > * not a parent of a chile matching item3 > > > > Part of your problem may be that (in your example you posted anywayway) > > you appear to be trying to use a *string* field for listing multiple > terms > > with commas and then seem to want to match on those individual terms -- > > that's not going to work. either make your string field a true > > multivalued field, or use a text field with tokenization. > > > > With the modified example data you provided below (using search_t instead > > of search_s) this query seems to do exactly waht you want... > > > > > http://localhost:8983/solr/select?p_filt=type_s:parent&q=*:*&fq={!parent%20which=$p_filt}search_t:item2&fq={!parent%20which=$p_filt}search_t:item1&fq=-{!parent%20which=$p_filt}search_t:item3 > > > > > > q = *:* > > p_filt = type_s:parent > > wt = json > > fq = {!parent which=$p_filt}search_t:item2 > > fq = {!parent which=$p_filt}search_t:item1 > > fq = -{!parent which=$p_filt}search_t:item3 > > > > > > -Hoss > > http://www.lucidworks.com/ > > > > > > ------------------------------ > > If you reply to this email, your message will be added to the discussion > > below: > > > > > http://lucene.472066.n3.nabble.com/Block-Join-Parent-Query-across-children-docs-tp4127637p4128734.html > > To unsubscribe from Block Join Parent Query across children docs, click > > here< > http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4127637&code=bG1lcnRlbnNAZ21haWwuY29tfDQxMjc2Mzd8LTU0NDAxMzQzMw== > > > > . > > 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 > > > > > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Block-Join-Parent-Query-across-children-docs-tp4127637p4129588.html > Sent from the Solr - User mailing list archive at Nabble.com. > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <mkhlud...@griddynamics.com>