[ 
https://issues.apache.org/jira/browse/SOLR-12505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16518834#comment-16518834
 ] 

Joel Bernstein edited comment on SOLR-12505 at 6/21/18 2:40 AM:
----------------------------------------------------------------

[~dsmiley], in a previous ticket (SOLR-10404) you changed how the fetch query 
was being sent down to the following:
{code:java}
buf.append("{! df=").append(rightKey).append(" q.op=OR cache=false 
}");//disable queryCache
{code}
I think we want this to be:
{code:java}
buf.append("{!lucene df=").append(rightKey).append(" q.op=OR cache=false 
}");//disable queryCache
{code}
Otherwise if a defType is defined in the request handler that does not use "df" 
or "q.op" those local params will be ignored.

I'm not sure if that is what's causing the problem in this case, but it does 
appear like it would be a problem in general.


was (Author: joel.bernstein):
[~dsmiley], in a previous ticket (SOLR-10404) you changed how the fetch query 
was being sent down to the following:
{code:java}
buf.append("{! df=").append(rightKey).append(" q.op=OR cache=false 
}");//disable queryCache
{code}
I think we want this to be:
{code:java}
buf.append("{!lucene df=").append(rightKey).append(" q.op=OR cache=false 
}");//disable queryCache
{code}
Otherwise if a defType is defined in the request handler that does not use "df" 
or "q.op" those local params will be ignored.

I'm not sure if that's what causing the problem in this case, but it does 
appear like it would be a problem in general.

 

 

> Streaming expressions - fetch() does not work as expected
> ---------------------------------------------------------
>
>                 Key: SOLR-12505
>                 URL: https://issues.apache.org/jira/browse/SOLR-12505
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 7.3.1
>         Environment: Windows 10, Java 10, Solr Cloud 7.3.1
>            Reporter: Dariusz Wojtas
>            Assignee: Joel Bernstein
>            Priority: Major
>         Attachments: names.zip
>
>
> The issue:
>  # when I try to use fetch() within a streaming expression, it does not 
> enrich the inner source data. The result is exactly the same as if there was 
> no surrounding fetch() function.
>  # but it works if I try to do a leftOuterJoin() function instead.
> Use the attached 'names' collection configuration.
>  SOLR works in _cloud_ mode, streaming expressions do work, ie. stream(), 
> join(), etc
> Data to be inserted:
>  ==
> {code:xml}
> <add>
>  <doc>
>   <field name="id">1</field>
>   <field name="type">entity</field>
>   <field name="name">Orignal Darek name</field>
>   <field name="country">uk</field>
>   <doc>
>    <field name="id">N001</field>
>    <field name="parentId">1</field>
>    <field name="type">alternate</field>
>    <field name="alias">Darek</field>
>   </doc>
>   <doc>
>    <field name="id">N002</field>
>    <field name="parentId">1</field>
>    <field name="type">alternate</field>
>    <field name="alias">Darke</field>
>   </doc>
>   <doc>
>    <field name="id">N003</field>
>    <field name="parentId">1</field>
>    <field name="type">alternate</field>
>       <field name="alias">Darko</field>
>   </doc>
>  </doc>
>  <doc>
>   <field name="id">2</field>
>   <field name="type">entity</field>
>   <field name="name">Texaco</field>
>   <field name="country">de</field>
>   <doc>
>    <field name="id">N0011</field>
>    <field name="parentId">2</field>
>    <field name="type">alternate</field>
>    <field name="alias">Texxo</field>
>   </doc>
>   <doc>
>    <field name="id">N0012</field>
>    <field name="parentId">2</field>
>    <field name="type">alternate</field>
>    <field name="alias">Texoco</field>
>   </doc>
>  </doc>
> </add>
> {code}
> ==
>  The streaming query to execute.
>  Simplified, as the mainsearch usually does more complext stuff.
>  ==
> {noformat}
>  fetch( 
>  names,
>  search(names,
>  qt="/select",
>  q="*:*",
>  fq="type:alternate",
>  fl="parentId, alias",
>  rows=10,
>  sort="parentId asc"), 
>  on="parentId=id",
>  fl="name,country"
>  )
> {noformat}
> ==
> *Result*:
>  * Collection of attributes: parentId, alias
> *Expected result*:
>  * Collection of attributes: parentId, alias, name, country



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to