1
需要在apache solr中傳遞userID參數。是否可以將參數傳遞給mysql apache solr?
實施例:
http://localhost.com:8983/solr/collection1/select?q=ABC &重量= JSON &縮進=真&用戶ID = THIS-PARAMETR-NEED-PASS
<dataConfig>
<dataSource type="JdbcDataSource" name="ds-1" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/mydatabase" user="root" password="root"/>
<document name="t">
<entity name="act" dataSource="ds-1" query="SELECT * FROM mytable WHERE UserID='THIS-PARAMETR-NEED-PASS'">
<field column="Ac" name="acid"/>
<field column="UserID" name="userid"/>
<field column="Comment" name="comment"/>
<entity name="m"
query="SELECT * FROM `table2`WHERE `tid` = '${mytable.tid}'">
<field column="Title" name="title"/>
</entity>
</document>
</dataConfig>