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 Gael Jourdan-Weil <ga...@kelkoogroup.com> on 2020/10/01 15:31:28 UTC
Using streaming expressions with shards filter
Hello,
I am trying to use a Streaming Expression to query only a subset of the shards of a collection.
I expected to be able to use the "shards" parameter like on a regular query on "/select" for instance but this appear to not work or I don't know how to do it.
Is this somehow a feature/restriction of Streaming expressions?
Or am I missing something?
Note that the Streaming Expression I use is actually using the "/export" request handler.
Example of the streaming expression:
curl -X POST -v --data-urlencode 'expr=search(myCollection,q="*:*",fl="id",sort="id asc",qt="/export")' 'http://myserver/solr/myCollection/stream'
Solr version: 8.4
Best regards,
Gaël
RE: Using streaming expressions with shards filter
Posted by Gael Jourdan-Weil <ga...@kelkoogroup.com>.
Thanks Joel.
I will try it in the future if I still need it (for now I went for another solution that fits my needs).
Gaël
Re: Using streaming expressions with shards filter
Posted by Joel Bernstein <jo...@gmail.com>.
Actually it's:
<collectionName>.shards=shard1,shard2,shard3...
Joel Bernstein
http://joelsolr.blogspot.com/
On Tue, Oct 6, 2020 at 2:38 PM Joel Bernstein <jo...@gmail.com> wrote:
>
> There is a parameter in streaming expressions for this but it is not
> available for use in every stream source. The search expression should
> honor it though.
>
> If you pass the <collectionName>.shard=shard1,shard2,shard3...
>
> The search stream will honor this.
>
> This work was originally done for supporting no-SolrCloud streaming
> expressions but was not fully realized yet.
>
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
>
> On Thu, Oct 1, 2020 at 11:31 AM Gael Jourdan-Weil <
> gael.jourdan-weil@kelkoogroup.com> wrote:
>
>> Hello,
>>
>> I am trying to use a Streaming Expression to query only a subset of the
>> shards of a collection.
>> I expected to be able to use the "shards" parameter like on a regular
>> query on "/select" for instance but this appear to not work or I don't know
>> how to do it.
>>
>> Is this somehow a feature/restriction of Streaming expressions?
>> Or am I missing something?
>>
>> Note that the Streaming Expression I use is actually using the "/export"
>> request handler.
>>
>> Example of the streaming expression:
>> curl -X POST -v --data-urlencode
>> 'expr=search(myCollection,q="*:*",fl="id",sort="id asc",qt="/export")' '
>> http://myserver/solr/myCollection/stream'
>>
>> Solr version: 8.4
>>
>> Best regards,
>> Gaël
>
>
Re: Using streaming expressions with shards filter
Posted by Joel Bernstein <jo...@gmail.com>.
There is a parameter in streaming expressions for this but it is not
available for use in every stream source. The search expression should
honor it though.
If you pass the <collectionName>.shard=shard1,shard2,shard3...
The search stream will honor this.
This work was originally done for supporting no-SolrCloud streaming
expressions but was not fully realized yet.
Joel Bernstein
http://joelsolr.blogspot.com/
On Thu, Oct 1, 2020 at 11:31 AM Gael Jourdan-Weil <
gael.jourdan-weil@kelkoogroup.com> wrote:
> Hello,
>
> I am trying to use a Streaming Expression to query only a subset of the
> shards of a collection.
> I expected to be able to use the "shards" parameter like on a regular
> query on "/select" for instance but this appear to not work or I don't know
> how to do it.
>
> Is this somehow a feature/restriction of Streaming expressions?
> Or am I missing something?
>
> Note that the Streaming Expression I use is actually using the "/export"
> request handler.
>
> Example of the streaming expression:
> curl -X POST -v --data-urlencode
> 'expr=search(myCollection,q="*:*",fl="id",sort="id asc",qt="/export")' '
> http://myserver/solr/myCollection/stream'
>
> Solr version: 8.4
>
> Best regards,
> Gaël