You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by mcerina <gi...@git.apache.org> on 2015/03/13 18:03:24 UTC

[GitHub] lucene-solr pull request: add support for request parameter placeh...

GitHub user mcerina opened a pull request:

    https://github.com/apache/lucene-solr/pull/133

    add support for request parameter placeholders to property writer conf

    It would be nice to be able to use placeholders (getting values from request parameters) when configuring the "filename" property of a PropertyWriter.
    
    In our use case, we have a single collection that contains a few millions documents. Let's say each document has, among all its fields, a field named "country".
    We must support incremental updates of the collection. We must fetch the updates from a set of databases, one for each country. Updates of the data pertaining to different countries must be scheduled indepdendently and with different delays.
    So, to support the delta-update on our collection, we can pass a parameter to the Data Import Handler saying which country to update, and the DIH reads and writes from/to a properties file named <collection>_<country>.properties. This way, each country has its own last_index_time stored in its own property file (all of the properties files refer to the same collection, but to different subset of data, based on the country).
    This is useful as the documents related to some countries are updated hourly, some every 30 minutes and so on.
    
    I looked forward to write some sort of test for this, but I couldn't figure out how to do it in the current test suite (I think there was only an integration test related to placeholder substitution, but I don't remember why it wasn't easy to add an assertion or a separate test method for this).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mcerina/lucene-solr property-writer

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucene-solr/pull/133.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #133
    
----
commit dcfe0704c4c8e3281a7c5a7b10a0c730b3421ea5
Author: Matteo Cerina <ma...@gmail.com>
Date:   2015-03-13T16:37:05Z

    added support for request parameter placeholders to property writer configuration

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org