Created
January 25, 2016 13:19
-
-
Save voidberg/620b11405af1a1373e8a to your computer and use it in GitHub Desktop.
A script to test a bug in solr-client.
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
| var solr = require('solr-client'); | |
| var client = solr.createClient({ | |
| url: 'http://197.0.0.1:8983/solr', | |
| core: 'core', | |
| get_max_request_entity_size: 1024, | |
| }); | |
| var query = client.createQuery(); | |
| var parts = []; | |
| for (var i = 0; i < 1000; i++) { | |
| parts.push('field_foo_i:' + i); | |
| } | |
| var fq = parts.join(' OR '); | |
| query.set('fq=' + encodeURIComponent(fq)); | |
| client.search(query, function (err, results) { | |
| if (err) { | |
| console.log(err); | |
| return; | |
| } | |
| console.log(results); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment