using stringbuilder in query construction

pull/1/head
orbiter 11 years ago
parent 74466d731a
commit 7e346e1d79

@ -316,7 +316,9 @@ public abstract class AbstractSolrConnector implements SolrConnector {
final SolrQuery query = new SolrQuery();
assert id.length() == 12;
// construct query
query.setQuery("{!raw f=" + CollectionSchema.id.getSolrFieldName() + "}" + id);
StringBuilder sb = new StringBuilder(23);
sb.append("{!raw f=").append(CollectionSchema.id.getSolrFieldName()).append('}').append(id);
query.setQuery(sb.toString());
query.clearSorts();
query.setRows(1);
query.setStart(0);

Loading…
Cancel
Save