Solr manual query understanding

Solr query is to query from each shard. Then aggregate it out.

 

SolrCloud manual routing is done through the routing field.

<field name="_route_" type="string"/>

When the index is created, the setting route field needs to be displayed.

doc.addField("_route_","shard_x");

 

http://localhost:8980/solr/admin/collections?action=DELETE&name=trade_hand

 

http://localhost:8980/solr/admin/collections?action=CREATE&name=trade_hand

&collection.configName=tradeConf&router.name=implicit&shards=shard1,shard2

 

when inquiring

http://localhost:8980/solr/trade_hand/select?indent=on&q=shopNick:xxxx&wt=json&_route_=shard1

http://localhost:8980/solr/trade_hand/select?indent=on&q=shopNick:xxxx&wt=json&_route_=shard2

 

If you bring routing, solr can query the data very accurately.

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326743702&siteId=291194637