Below is my data-config.xml file, which I am using to build an index for my first shard. I have a couple of questions.

Can Solr include the hostname (short version) it's running on in the query? Alternatively, is there a way to override the query with a URL parameter before or when doing the full import? I'd like to avoid having to parse and rewrite the config file.

My ultimate goal is to write a completely generic query that gets the values represented by 6, 0, and 229615984 in the example below from a small config table, but I'll take baby steps in that direction.

<dataConfig>
<dataSource type="JdbcDataSource"
    driver="com.mysql.jdbc.Driver"
    encoding="UTF-8"
url="jdbc:mysql://[hostname]:3306/[database]?zeroDateTimeBehavior=convertToNull"
    batchSize="-1"
    user="[user]"
    password="[password]"/>
<document>
<entity name="[table]" pk="did"
query="SELECT * FROM [table] WHERE (did % 6) = 0 AND 229615984 >= did">
</entity>
</document>
</dataConfig>

Reply via email to