11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

stats(collection1,<br />

q=*:*,<br />

sum(a_i),<br />

sum(a_f),<br />

min(a_i),<br />

min(a_f),<br />

max(a_i),<br />

max(a_f),<br />

avg(a_i),<br />

avg(a_f),<br />

count(*))<br />

topic<br />

The topic function provides publish/subscribe messaging capabilities built on top of <strong>Solr</strong>Cloud. The topic<br />

function allows users to subscribe to a query. The function then provides one-time delivery of new or updated<br />

documents that match the topic query. The initial call to the topic function establishes the checkpoints for the<br />

specific topic ID. Subsequent calls to the same topic ID will return new or updated documents that match the<br />

topic query.<br />

The topic function should be considered in beta until SOLR-8709 is committed and released.<br />

Parameters<br />

Syntax<br />

checkpointCollection: (Mandatory) The collection where the topic checkpoints are stored.<br />

collection: (Mandatory) The collection that the topic query will be run on.<br />

id: (Mandatory) The unique ID for the topic. The checkpoints will be saved under this id.<br />

q: (Mandatory) The topic query.<br />

fl: (Mandatory) The field list returned by the topic function.<br />

topic(checkpointCollection,<br />

collection,<br />

id="uniqueId",<br />

q="topic query",<br />

fl="id, name, country")<br />

Stream Decorators<br />

Stream decorators wrap other stream functions or perform operations on the stream. The are currently many<br />

stream decorators available: complement, daemon, innerJoin, intersect, hashJoin, merge, leftOuterJoin,<br />

ou<br />

terHashJoin , parallel, reduce, rollup, select, top, unique, and update.<br />

complement<br />

The complement function wraps two streams (A and B) and emits tuples from A which do not exist in B. The<br />

tuples are emitted in the order in which they appear in stream A. Both streams must be sorted by the fields being<br />

used to determine equality (using the on parameter).<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

412

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!