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 Alfonso Muñoz-Pomer Fuentes <am...@ebi.ac.uk> on 2018/06/21 17:35:53 UTC
Search streaming expressions returns rows times number of shards docs
I’m having a weird issue with the search streaming expressions and I’d like to share it before opening a ticket in Jira, just in case I’m missing something obvious.
I’m currently on Solr 7.1 and I have a collection named bioentities split into two shards and no replicas. Whenever I run a query such as this:
search(
bioentities,
q="*:*",
fl="bioentity_identifier,property_value,property_name",
sort="bioentity_identifier asc")
I’m getting 20 documents. If I add e.g. rows=4 I get 8 results, and so on.
I have the same collection in another SolrCloud cluster, split into three shards and running the same queries I get 30 and 12 results, respectively. So it seems that the seach expression distributes the query between shards and then aggregates the results. Is this the expected behaviour?
Thanks in advance.
--
Alfonso Muñoz-Pomer Fuentes
Senior Lead Software Engineer @ Expression Atlas Team
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Tel:+ 44 (0) 1223 49 2633
Skype: amunozpomer
Re: Search streaming expressions returns rows times number of shards
docs
Posted by Alfonso Muñoz-Pomer Fuentes <am...@ebi.ac.uk>.
Thanks a lot for the clarification. I created a Jira ticket not to lose track of this:
https://issues.apache.org/jira/browse/SOLR-12510
> On 21 Jun 2018, at 20:53, Joel Bernstein <jo...@gmail.com> wrote:
>
> That is actually the current behavior of the search expression. The initial
> use cases from Streaming Expressions revolved around joins and rollups
> which really require the entire result set. So the search expression just
> merged the results from the shards and let the wrapping expression deal
> with the results. Things have evolved quite a bit since then and having the
> search expression respect the rows parameter is something that I've been
> meaning to add. Feel free to create a ticket for this.
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Thu, Jun 21, 2018 at 1:35 PM, Alfonso Muñoz-Pomer Fuentes <
> amunoz@ebi.ac.uk> wrote:
>
>> I’m having a weird issue with the search streaming expressions and I’d
>> like to share it before opening a ticket in Jira, just in case I’m missing
>> something obvious.
>>
>> I’m currently on Solr 7.1 and I have a collection named bioentities split
>> into two shards and no replicas. Whenever I run a query such as this:
>> search(
>> bioentities,
>> q="*:*",
>> fl="bioentity_identifier,property_value,property_name",
>> sort="bioentity_identifier asc")
>>
>> I’m getting 20 documents. If I add e.g. rows=4 I get 8 results, and so on.
>>
>> I have the same collection in another SolrCloud cluster, split into three
>> shards and running the same queries I get 30 and 12 results, respectively.
>> So it seems that the seach expression distributes the query between shards
>> and then aggregates the results. Is this the expected behaviour?
>>
>> Thanks in advance.
>>
>> --
>> Alfonso Muñoz-Pomer Fuentes
>> Senior Lead Software Engineer @ Expression Atlas Team
>> European Bioinformatics Institute (EMBL-EBI)
>> European Molecular Biology Laboratory
>> Tel:+ 44 (0) 1223 49 2633
>> Skype: amunozpomer
>>
>>
--
Alfonso Muñoz-Pomer Fuentes
Senior Lead Software Engineer @ Expression Atlas Team
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Tel:+ 44 (0) 1223 49 2633
Skype: amunozpomer
Re: Search streaming expressions returns rows times number of shards
docs
Posted by Alfonso Muñoz-Pomer Fuentes <am...@ebi.ac.uk>.
Yes, I specifically was addressing the /select handler, sorry about not mentioning it explicitly. My use case was, originally, with CloudSolrStream in SolrJ, where I could observe the same behaviour and I created the streaming expression in the UI to test if it was SolrJ-specific.
> On 21 Jun 2018, at 21:01, Aroop Ganguly <ar...@icloud.com> wrote:
>
> So I think 2 things are being missed here. You should be specifying the qt=“/export” to see all the results.
> If you do not do that, then the select handler is used by default which gives the default 10-20 rows as result.
>
>> On Jun 21, 2018, at 12:53 PM, Joel Bernstein <jo...@gmail.com> wrote:
>>
>> That is actually the current behavior of the search expression. The initial
>> use cases from Streaming Expressions revolved around joins and rollups
>> which really require the entire result set. So the search expression just
>> merged the results from the shards and let the wrapping expression deal
>> with the results. Things have evolved quite a bit since then and having the
>> search expression respect the rows parameter is something that I've been
>> meaning to add. Feel free to create a ticket for this.
>>
>> Joel Bernstein
>> http://joelsolr.blogspot.com/
>>
>> On Thu, Jun 21, 2018 at 1:35 PM, Alfonso Muñoz-Pomer Fuentes <
>> amunoz@ebi.ac.uk> wrote:
>>
>>> I’m having a weird issue with the search streaming expressions and I’d
>>> like to share it before opening a ticket in Jira, just in case I’m missing
>>> something obvious.
>>>
>>> I’m currently on Solr 7.1 and I have a collection named bioentities split
>>> into two shards and no replicas. Whenever I run a query such as this:
>>> search(
>>> bioentities,
>>> q="*:*",
>>> fl="bioentity_identifier,property_value,property_name",
>>> sort="bioentity_identifier asc")
>>>
>>> I’m getting 20 documents. If I add e.g. rows=4 I get 8 results, and so on.
>>>
>>> I have the same collection in another SolrCloud cluster, split into three
>>> shards and running the same queries I get 30 and 12 results, respectively.
>>> So it seems that the seach expression distributes the query between shards
>>> and then aggregates the results. Is this the expected behaviour?
>>>
>>> Thanks in advance.
>>>
>>> --
>>> Alfonso Muñoz-Pomer Fuentes
>>> Senior Lead Software Engineer @ Expression Atlas Team
>>> European Bioinformatics Institute (EMBL-EBI)
>>> European Molecular Biology Laboratory
>>> Tel:+ 44 (0) 1223 49 2633
>>> Skype: amunozpomer
>>>
>>>
>
--
Alfonso Muñoz-Pomer Fuentes
Senior Lead Software Engineer @ Expression Atlas Team
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Tel:+ 44 (0) 1223 49 2633
Skype: amunozpomer
Re: Search streaming expressions returns rows times number of shards
docs
Posted by Aroop Ganguly <ar...@icloud.com>.
So I think 2 things are being missed here. You should be specifying the qt=“/export” to see all the results.
If you do not do that, then the select handler is used by default which gives the default 10-20 rows as result.
> On Jun 21, 2018, at 12:53 PM, Joel Bernstein <jo...@gmail.com> wrote:
>
> That is actually the current behavior of the search expression. The initial
> use cases from Streaming Expressions revolved around joins and rollups
> which really require the entire result set. So the search expression just
> merged the results from the shards and let the wrapping expression deal
> with the results. Things have evolved quite a bit since then and having the
> search expression respect the rows parameter is something that I've been
> meaning to add. Feel free to create a ticket for this.
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Thu, Jun 21, 2018 at 1:35 PM, Alfonso Muñoz-Pomer Fuentes <
> amunoz@ebi.ac.uk> wrote:
>
>> I’m having a weird issue with the search streaming expressions and I’d
>> like to share it before opening a ticket in Jira, just in case I’m missing
>> something obvious.
>>
>> I’m currently on Solr 7.1 and I have a collection named bioentities split
>> into two shards and no replicas. Whenever I run a query such as this:
>> search(
>> bioentities,
>> q="*:*",
>> fl="bioentity_identifier,property_value,property_name",
>> sort="bioentity_identifier asc")
>>
>> I’m getting 20 documents. If I add e.g. rows=4 I get 8 results, and so on.
>>
>> I have the same collection in another SolrCloud cluster, split into three
>> shards and running the same queries I get 30 and 12 results, respectively.
>> So it seems that the seach expression distributes the query between shards
>> and then aggregates the results. Is this the expected behaviour?
>>
>> Thanks in advance.
>>
>> --
>> Alfonso Muñoz-Pomer Fuentes
>> Senior Lead Software Engineer @ Expression Atlas Team
>> European Bioinformatics Institute (EMBL-EBI)
>> European Molecular Biology Laboratory
>> Tel:+ 44 (0) 1223 49 2633
>> Skype: amunozpomer
>>
>>
Re: Search streaming expressions returns rows times number of shards docs
Posted by Joel Bernstein <jo...@gmail.com>.
That is actually the current behavior of the search expression. The initial
use cases from Streaming Expressions revolved around joins and rollups
which really require the entire result set. So the search expression just
merged the results from the shards and let the wrapping expression deal
with the results. Things have evolved quite a bit since then and having the
search expression respect the rows parameter is something that I've been
meaning to add. Feel free to create a ticket for this.
Joel Bernstein
http://joelsolr.blogspot.com/
On Thu, Jun 21, 2018 at 1:35 PM, Alfonso Muñoz-Pomer Fuentes <
amunoz@ebi.ac.uk> wrote:
> I’m having a weird issue with the search streaming expressions and I’d
> like to share it before opening a ticket in Jira, just in case I’m missing
> something obvious.
>
> I’m currently on Solr 7.1 and I have a collection named bioentities split
> into two shards and no replicas. Whenever I run a query such as this:
> search(
> bioentities,
> q="*:*",
> fl="bioentity_identifier,property_value,property_name",
> sort="bioentity_identifier asc")
>
> I’m getting 20 documents. If I add e.g. rows=4 I get 8 results, and so on.
>
> I have the same collection in another SolrCloud cluster, split into three
> shards and running the same queries I get 30 and 12 results, respectively.
> So it seems that the seach expression distributes the query between shards
> and then aggregates the results. Is this the expected behaviour?
>
> Thanks in advance.
>
> --
> Alfonso Muñoz-Pomer Fuentes
> Senior Lead Software Engineer @ Expression Atlas Team
> European Bioinformatics Institute (EMBL-EBI)
> European Molecular Biology Laboratory
> Tel:+ 44 (0) 1223 49 2633
> Skype: amunozpomer
>
>