Last active
December 22, 2015 14:09
-
-
Save altfatterz/6483887 to your computer and use it in GitHub Desktop.
register query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client.prepareIndex("households", "_percolator", "myQuery") | |
.setSource(jsonBuilder() | |
.startObject() | |
.field("query", constantScoreQuery(filterBuilder())) | |
.field("user_id", "123") | |
.endObject()) | |
.setRefresh(true) // Needed when the query shall be available immediately | |
.execute().actionGet(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment