mirror of https://github.com/apache/lucene.git
Upgraded to Lucene 2.9-dev r768228
Fixes for changes in trie introduced with LUCENE-1602 Implemented SolrIndexSearcher#search(Weight, Filter, Collector) to fix compile error git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@768240 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
354f780613
commit
31b15cbb23
|
@ -402,6 +402,8 @@ Other Changes
|
|||
|
||||
26. SOLR-804: Added Lucene's misc contrib JAR (rev 764281). (gsingers)
|
||||
|
||||
27. Upgraded to Lucene 2.9-dev r768228 (shalin)
|
||||
|
||||
Build
|
||||
----------------------
|
||||
1. SOLR-776: Added in ability to sign artifacts via Ant for releases (gsingers)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
AnyObjectId[7d13c44721860aef7c2ea9b17b2b4cbac98cf6f7] was removed in git history.
|
||||
AnyObjectId[428a55fe75dbf4220bcabf342fb0fa921f32695e] was removed in git history.
|
||||
Apache SVN contains full history.
|
|
@ -1,2 +1,2 @@
|
|||
AnyObjectId[04bc7ae6e6cc343ade7e43bf42b3bce97d9e5954] was removed in git history.
|
||||
AnyObjectId[d050ce600994d982e429d6605d499c4faf386bfd] was removed in git history.
|
||||
Apache SVN contains full history.
|
|
@ -1,2 +1,2 @@
|
|||
AnyObjectId[6a686abf403738ec93b9e8b7de66878ed0aee14d] was removed in git history.
|
||||
AnyObjectId[e6a55b2a71b79730eb1e476070a60c5ad659c09a] was removed in git history.
|
||||
Apache SVN contains full history.
|
|
@ -1,2 +1,2 @@
|
|||
AnyObjectId[9664195864691ffb40bb729ea581f7ec8644497a] was removed in git history.
|
||||
AnyObjectId[fcdd0eeef36a6c7bb4c32904049f52994ff40d61] was removed in git history.
|
||||
Apache SVN contains full history.
|
|
@ -1,2 +1,2 @@
|
|||
AnyObjectId[26ab10a447cb308f1f139087d031c378a84ff635] was removed in git history.
|
||||
AnyObjectId[ce1de363884f2b7bf8da4744e9ac044d647cb8d0] was removed in git history.
|
||||
Apache SVN contains full history.
|
|
@ -1,2 +1,2 @@
|
|||
AnyObjectId[e3d36c294abda52c7fa7598c1f614ff0aa7594ad] was removed in git history.
|
||||
AnyObjectId[744a96d3fb652fc9cf997fcf5284da15a06fcf7a] was removed in git history.
|
||||
Apache SVN contains full history.
|
|
@ -1,2 +1,2 @@
|
|||
AnyObjectId[2c189b0b4f45bddd0f307ce73bc670e22a7a3c26] was removed in git history.
|
||||
AnyObjectId[dba82cdd918a35fb96595591d8ad578035eb4fb7] was removed in git history.
|
||||
Apache SVN contains full history.
|
|
@ -17,12 +17,10 @@
|
|||
package org.apache.solr.schema;
|
||||
|
||||
import org.apache.lucene.document.Fieldable;
|
||||
import org.apache.lucene.search.Filter;
|
||||
import org.apache.lucene.search.SortField;
|
||||
import org.apache.lucene.search.Query;
|
||||
import org.apache.lucene.search.ConstantScoreQuery;
|
||||
import org.apache.lucene.search.trie.IntTrieRangeFilter;
|
||||
import org.apache.lucene.search.trie.LongTrieRangeFilter;
|
||||
import org.apache.lucene.search.SortField;
|
||||
import org.apache.lucene.search.trie.IntTrieRangeQuery;
|
||||
import org.apache.lucene.search.trie.LongTrieRangeQuery;
|
||||
import org.apache.lucene.search.trie.TrieUtils;
|
||||
import org.apache.solr.analysis.*;
|
||||
import org.apache.solr.common.SolrException;
|
||||
|
@ -42,9 +40,7 @@ import java.util.Map;
|
|||
* link. The possible number of terms increases dramatically with higher precision steps (factor 2^precisionStep). For
|
||||
* the fast range search to work, trie fields must be indexed.
|
||||
* <p/>
|
||||
* Trie fields are <b>not</b> sortable in numerical order. Also, they cannot be used in function queries. If one needs
|
||||
* sorting as well as fast range search, one should create a copy field specifically for sorting. Same workaround is
|
||||
* suggested for using trie fields in function queries as well.
|
||||
* Trie fields are sortable in numerical order and can be used in function queries.
|
||||
* <p/>
|
||||
* Note that if you use a precisionStep of 32 for int/float and 64 for long/double, then multiple terms will not be
|
||||
* generated, range search will be no faster than any other number field, but sorting will be possible.
|
||||
|
@ -171,39 +167,39 @@ public class TrieField extends FieldType {
|
|||
Query query = null;
|
||||
switch (type) {
|
||||
case INTEGER:
|
||||
query = new IntTrieRangeFilter(field, precisionStep,
|
||||
query = new IntTrieRangeQuery(field, precisionStep,
|
||||
min == null ? null : Integer.parseInt(min),
|
||||
max == null ? null : Integer.parseInt(max),
|
||||
minInclusive, maxInclusive).asQuery();
|
||||
minInclusive, maxInclusive);
|
||||
break;
|
||||
case FLOAT:
|
||||
query = new IntTrieRangeFilter(field, precisionStep,
|
||||
query = new IntTrieRangeQuery(field, precisionStep,
|
||||
min == null ? null : TrieUtils.floatToSortableInt(Float.parseFloat(min)),
|
||||
max == null ? null : TrieUtils.floatToSortableInt(Float.parseFloat(max)),
|
||||
minInclusive, maxInclusive).asQuery();
|
||||
minInclusive, maxInclusive);
|
||||
break;
|
||||
case LONG:
|
||||
query = new LongTrieRangeFilter(field, precisionStep,
|
||||
query = new LongTrieRangeQuery(field, precisionStep,
|
||||
min == null ? null : Long.parseLong(min),
|
||||
max == null ? null : Long.parseLong(max),
|
||||
minInclusive, maxInclusive).asQuery();
|
||||
minInclusive, maxInclusive);
|
||||
break;
|
||||
case DOUBLE:
|
||||
query = new LongTrieRangeFilter(field, precisionStep,
|
||||
query = new LongTrieRangeQuery(field, precisionStep,
|
||||
min == null ? null : TrieUtils.doubleToSortableLong(Double.parseDouble(min)),
|
||||
max == null ? null : TrieUtils.doubleToSortableLong(Double.parseDouble(max)),
|
||||
minInclusive, maxInclusive).asQuery();
|
||||
minInclusive, maxInclusive);
|
||||
break;
|
||||
case DATE:
|
||||
query = new LongTrieRangeFilter(field, precisionStep,
|
||||
query = new LongTrieRangeQuery(field, precisionStep,
|
||||
min == null ? null : dateField.parseMath(null, min).getTime(),
|
||||
max == null ? null : dateField.parseMath(null, max).getTime(),
|
||||
minInclusive, maxInclusive).asQuery();
|
||||
minInclusive, maxInclusive);
|
||||
break;
|
||||
default:
|
||||
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Unknown type for trie field");
|
||||
}
|
||||
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
|
@ -497,6 +497,10 @@ public class SolrIndexSearcher extends Searcher implements SolrInfoMBean {
|
|||
searcher.search(weight, filter, hitCollector);
|
||||
}
|
||||
|
||||
public void search(Weight weight, Filter filter, Collector collector) throws IOException {
|
||||
searcher.search(weight, filter, collector);
|
||||
}
|
||||
|
||||
public Query rewrite(Query original) throws IOException {
|
||||
return searcher.rewrite(original);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue