SOLR-5019: don't modify original filter list

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1500903 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2013-07-08 19:39:42 +00:00
parent f092795fe9
commit 5b257ac4df
2 changed files with 6 additions and 3 deletions

View File

@ -265,6 +265,10 @@ Bug Fixes
* SOLR-4978: Time is stripped from datetime column when imported into Solr date field
if convertType=true. (Bill Au, shalin)
* SOLR-5019: spurious ConcurrentModificationException when spell check component
was in use with filters. (yonik)
Optimizations
----------------------

View File

@ -152,9 +152,8 @@ public class QueryComponent extends SearchComponent
String[] fqs = req.getParams().getParams(CommonParams.FQ);
if (fqs!=null && fqs.length!=0) {
List<Query> filters = rb.getFilters();
if (filters==null) {
filters = new ArrayList<Query>(fqs.length);
}
// if filters already exists, make a copy instead of modifying the original
filters = filters == null ? new ArrayList<Query>(fqs.length) : new ArrayList<Query>(filters);
for (String fq : fqs) {
if (fq != null && fq.trim().length()!=0) {
QParser fqp = QParser.getParser(fq, null, req);