[
https://issues.apache.org/jira/browse/SOLR-10880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16096103#comment-16096103
]
Domenico Fabio Marino edited comment on SOLR-10880 at 7/21/17 10:21 AM:
------------------------------------------------------------------------
Updated patch, it now supports replica tag disliking and looks cleaner overall
was (Author: dmarino):
Updated patch
> Support replica filtering by flavour
> ------------------------------------
>
> Key: SOLR-10880
> URL: https://issues.apache.org/jira/browse/SOLR-10880
> Project: Solr
> Issue Type: New Feature
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Domenico Fabio Marino
> Priority: Minor
> Attachments: SOLR-10880.patch, SOLR-10880.patch, SOLR-10880.patch
>
>
> Add a mechanism to allow queries to use only a subset of replicas(by
> specifying the wanted replica tag).
> Some replicas have to be marked as tag before running the query.
> A query has to specify ShardParams.REPLICA_TAG_NAME to specify what property
> holds the tag it wants to use (for example "replica.tag") and then use
> ShardParams.REPLICA_TAG_LIKE "tagName" to tell the ShardHandler to only use
> the replicas matching tagName.
> A query can also use ShardParams.REPLICA_TAG_DISLIKE "tagName" to use all the
> replicas that do not match tagName.
> In order to properly use this system, replicas need to be tagged, tagging a
> replica involves setting the property ShardParams.REPLICA_TAG_NAME to a
> property name and then set that property in the replicas.
> An example can be seen in the ReplicaTagTest included in this patch where a
> dynamic cloud has some tags assigned to it both randomly and on a fixed basis.
> A replica can have multiple tags attached to it, and these tags are separated
> by default by "|"(pipe character), the delimiter can be changed by setting
> ShardParams.REPLICA_TAG_DELIMITER in the query to anything else.
> No validity check is performed on the tags, therefore one may get an array of
> shard URLs that contains empty URLs, or that is null(when the property does
> not exist), the user of this feature has to deal with it.
> The tag to replica mappings are rebuilt for each query that specifies
> ShardParams.REPLICA_TAG_NAME.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]