11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

on: Fields to be used for checking equality of tuples between Left and Right. Can be of the format on="fi<br />

eldName" , on="fieldNameInLeft=fieldNameInRight" , or on="fieldName,<br />

otherFieldName=rightOtherFieldName".<br />

Syntax<br />

innerJoin(<br />

search(people, q=*:*, fl="personId,name", sort="personId asc"),<br />

search(pets, q=type:cat, fl="personId,petName", sort="personId asc"),<br />

on="personId"<br />

)<br />

innerJoin(<br />

search(people, q=*:*, fl="personId,name", sort="personId asc"),<br />

search(pets, q=type:cat, fl="ownerId,petName", sort="ownerId asc"),<br />

on="personId=ownerId"<br />

)<br />

innerJoin(<br />

search(people, q=*:*, fl="personId,name", sort="personId asc"),<br />

select(<br />

search(pets, q=type:cat, fl="ownerId,name", sort="ownerId asc"),<br />

ownerId,<br />

name as petName<br />

),<br />

on="personId=ownerId"<br />

)<br />

intersect<br />

The intersect function wraps two streams, A and B, and emits tuples from A which DO exist in B. The tuples<br />

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

to determine equality (the on parameter). Only tuples from A are emitted.<br />

Parameters<br />

Syntax<br />

StreamExpression for StreamA<br />

StreamExpression for StreamB<br />

on: Fields to be used for checking equality of tuples between A and B. Can be of the format on="fieldN<br />

ame" , on="fieldNameInLeft=fieldNameInRight" , or on="fieldName,<br />

otherFieldName=rightOtherFieldName".<br />

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

418

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

Saved successfully!

Ooh no, something went wrong!