-
-
Save jaminben/e641e7bafce7787e17b4 to your computer and use it in GitHub Desktop.
This file contains 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
// index function: | |
function(doc){ | |
if(doc.events) { | |
var ret = new Document(); | |
ret.add(parseInt(doc.site_id), {"field": "site_id", "type" : "int"}); | |
ret.add(doc.site_id.toString(), {"field": "siteid"}); | |
ret.add(parseInt(doc.site_id), {"field": "siteid1", "type" : "long"}); | |
ret.add(7, {"field": "test_long", "type" : "long"}); | |
ret.add(7, {"field": "test_int", "type" : "int"}); | |
ret.add(7, {"field": "test_string_int"}); | |
ret.add('7', {"field": "test_string"}); | |
return ret; | |
}else { return null } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
test1/_fti/_design/search/by_content?q=test_int:7
--> No results
test1/_fti/_design/search/by_content?q=test_long:7
--> No results
test1/_fti/_design/search/by_content?q=test_string:7
--> Works
test1/_fti/_design/search/by_content?q=test_string_int:7
--> Works