LUCENE-3249: Moved FunctionQuery impls to new Queries module

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1140906 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christopher John Male 2011-06-28 23:32:27 +00:00
parent e5addc06d3
commit a993ae9032
85 changed files with 139 additions and 98 deletions

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.docvalues;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueBool; import org.apache.lucene.common.mutable.MutableValueBool;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.docvalues;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueDouble; import org.apache.lucene.common.mutable.MutableValueDouble;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.docvalues;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueFloat; import org.apache.lucene.common.mutable.MutableValueFloat;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.docvalues;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueInt; import org.apache.lucene.common.mutable.MutableValueInt;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.docvalues;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueLong; import org.apache.lucene.common.mutable.MutableValueLong;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.docvalues;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueStr; import org.apache.lucene.common.mutable.MutableValueStr;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.docvalues;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueStr; import org.apache.lucene.common.mutable.MutableValueStr;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;

View File

@ -15,10 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;

View File

@ -15,15 +15,16 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.index.Term; import org.apache.lucene.index.Term;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.DoubleDocValues;
import org.apache.lucene.queries.function.docvalues.IntDocValues;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.solr.search.*;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -15,10 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.docvalues.DoubleDocValues;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueDouble; import org.apache.lucene.common.mutable.MutableValueDouble;
@ -23,6 +23,7 @@ import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSourceScorer; import org.apache.lucene.queries.function.ValueSourceScorer;
import org.apache.lucene.queries.function.docvalues.DoubleDocValues;
import org.apache.lucene.util.Bits; import org.apache.lucene.util.Bits;
import org.apache.lucene.search.cache.DoubleValuesCreator; import org.apache.lucene.search.cache.DoubleValuesCreator;
import org.apache.lucene.search.cache.CachedArray.DoubleValues; import org.apache.lucene.search.cache.CachedArray.DoubleValues;

View File

@ -15,11 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import java.io.IOException; import java.io.IOException;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.FieldCache;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@ -24,6 +24,7 @@ import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueFloat; import org.apache.lucene.common.mutable.MutableValueFloat;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.util.Bits; import org.apache.lucene.util.Bits;
import org.apache.lucene.search.cache.FloatValuesCreator; import org.apache.lucene.search.cache.FloatValuesCreator;
import org.apache.lucene.search.cache.CachedArray.FloatValues; import org.apache.lucene.search.cache.CachedArray.FloatValues;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.*; import org.apache.lucene.index.*;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueInt; import org.apache.lucene.common.mutable.MutableValueInt;
@ -23,6 +23,7 @@ import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSourceScorer; import org.apache.lucene.queries.function.ValueSourceScorer;
import org.apache.lucene.queries.function.docvalues.IntDocValues;
import org.apache.lucene.util.Bits; import org.apache.lucene.util.Bits;
import org.apache.lucene.search.cache.IntValuesCreator; import org.apache.lucene.search.cache.IntValuesCreator;
import org.apache.lucene.search.cache.CachedArray.IntValues; import org.apache.lucene.search.cache.CachedArray.IntValues;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@ -23,10 +23,10 @@ import java.util.Map;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.docvalues.IntDocValues;
import org.apache.lucene.search.FieldCache.DocTerms; import org.apache.lucene.search.FieldCache.DocTerms;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.ReaderUtil;
import org.apache.solr.common.SolrException;
/** /**
* Use a field value and find the Document Frequency within another field. * Use a field value and find the Document Frequency within another field.
@ -68,7 +68,7 @@ public class JoinDocFreqValueSource extends FieldCacheSource {
return v; return v;
} }
catch (IOException e) { catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "caught exception in function "+description()+" : doc="+doc, e); throw new RuntimeException("caught exception in function "+description()+" : doc="+doc, e);
} }
} }
}; };

View File

@ -15,11 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import java.io.IOException; import java.io.IOException;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -19,6 +19,7 @@ package org.apache.solr.search.function;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.StrDocValues;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import java.util.Map; import java.util.Map;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueLong; import org.apache.lucene.common.mutable.MutableValueLong;
@ -23,6 +23,7 @@ import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSourceScorer; import org.apache.lucene.queries.function.ValueSourceScorer;
import org.apache.lucene.queries.function.docvalues.LongDocValues;
import org.apache.lucene.util.Bits; import org.apache.lucene.util.Bits;
import org.apache.lucene.search.cache.LongValuesCreator; import org.apache.lucene.search.cache.LongValuesCreator;
import org.apache.lucene.search.cache.CachedArray.LongValues; import org.apache.lucene.search.cache.CachedArray.LongValues;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;

View File

@ -15,11 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.BoolDocValues;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import java.io.IOException; import java.io.IOException;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -19,6 +19,7 @@ package org.apache.solr.search.function;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import java.util.Map; import java.util.Map;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -15,11 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Similarity; import org.apache.lucene.search.Similarity;
import java.io.IOException; import java.io.IOException;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.search.cache.CachedArray; import org.apache.lucene.search.cache.CachedArray;
import org.apache.lucene.search.cache.CachedArrayCreator; import org.apache.lucene.search.cache.CachedArrayCreator;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueInt; import org.apache.lucene.common.mutable.MutableValueInt;
@ -23,6 +23,7 @@ import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.IntDocValues;
import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.FieldCache;
import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.ReaderUtil;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.common.mutable.MutableValue; import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueFloat; import org.apache.lucene.common.mutable.MutableValueFloat;
@ -23,10 +23,10 @@ import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.search.*; import org.apache.lucene.search.*;
import org.apache.lucene.search.Weight.ScorerContext; import org.apache.lucene.search.Weight.ScorerContext;
import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.ReaderUtil;
import org.apache.solr.common.SolrException;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@ -144,7 +144,7 @@ class QueryDocValues extends FloatDocValues {
// a match! // a match!
return scorer.score(); return scorer.score();
} catch (IOException e) { } catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "caught exception in QueryDocVals("+q+") doc="+doc, e); throw new RuntimeException("caught exception in QueryDocVals("+q+") doc="+doc, e);
} }
} }
@ -175,7 +175,7 @@ class QueryDocValues extends FloatDocValues {
// a match! // a match!
return true; return true;
} catch (IOException e) { } catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "caught exception in QueryDocVals("+q+") doc="+doc, e); throw new RuntimeException("caught exception in QueryDocVals("+q+") doc="+doc, e);
} }
} }
@ -184,7 +184,7 @@ class QueryDocValues extends FloatDocValues {
try { try {
return exists(doc) ? scorer.score() : null; return exists(doc) ? scorer.score() : null;
} catch (IOException e) { } catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "caught exception in QueryDocVals("+q+") doc="+doc, e); throw new RuntimeException("caught exception in QueryDocVals("+q+") doc="+doc, e);
} }
} }
@ -238,7 +238,7 @@ class QueryDocValues extends FloatDocValues {
mval.exists = true; mval.exists = true;
return; return;
} catch (IOException e) { } catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "caught exception in QueryDocVals("+q+") doc="+doc, e); throw new RuntimeException("caught exception in QueryDocVals("+q+") doc="+doc, e);
} }
} }
}; };

View File

@ -15,11 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import java.io.IOException; import java.io.IOException;

View File

@ -15,11 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import java.io.IOException; import java.io.IOException;

View File

@ -15,12 +15,13 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.IntDocValues;
import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.FieldCache;
import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.ReaderUtil;

View File

@ -15,11 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.ReaderUtil;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -15,11 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.BoolDocValues;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import java.io.IOException; import java.io.IOException;

View File

@ -15,11 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -20,11 +20,11 @@ package org.apache.solr.search.function;
import org.apache.lucene.index.*; import org.apache.lucene.index.*;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Similarity; import org.apache.lucene.search.Similarity;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.solr.common.SolrException;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@ -103,7 +103,7 @@ public class TFValueSource extends TermFreqValueSource {
// a match! // a match!
return similarity.tf(docs.freq()); return similarity.tf(docs.freq());
} catch (IOException e) { } catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "caught exception in function "+description()+" : doc="+doc, e); throw new RuntimeException("caught exception in function "+description()+" : doc="+doc, e);
} }
} }
}; };

View File

@ -15,14 +15,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.index.*; import org.apache.lucene.index.*;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.docvalues.IntDocValues;
import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.solr.common.SolrException;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@ -100,7 +100,7 @@ public class TermFreqValueSource extends DocFreqValueSource {
// a match! // a match!
return docs.freq(); return docs.freq();
} catch (IOException e) { } catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "caught exception in function "+description()+" : doc="+doc, e); throw new RuntimeException("caught exception in function "+description()+" : doc="+doc, e);
} }
} }
}; };

View File

@ -1,4 +1,4 @@
package org.apache.solr.search.function; package org.apache.lucene.queries.function.valuesource;
/** /**
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -20,7 +20,6 @@ import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.solr.search.function.MultiValueSource;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;

View File

@ -22,6 +22,8 @@ import org.apache.lucene.common.mutable.MutableValueBool;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.BoolDocValues;
import org.apache.lucene.queries.function.valuesource.OrdFieldSource;
import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.FieldCache;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;

View File

@ -18,13 +18,13 @@ package org.apache.solr.schema;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.ByteFieldSource;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.search.cache.ByteValuesCreator; import org.apache.lucene.search.cache.ByteValuesCreator;
import org.apache.lucene.search.cache.CachedArrayCreator; import org.apache.lucene.search.cache.CachedArrayCreator;
import org.apache.solr.response.TextResponseWriter; import org.apache.solr.response.TextResponseWriter;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.ByteFieldSource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -21,6 +21,8 @@ import org.apache.lucene.document.Fieldable;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.StringIndexDocValues;
import org.apache.lucene.queries.function.valuesource.FieldCacheSource;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.search.TermRangeQuery; import org.apache.lucene.search.TermRangeQuery;

View File

@ -19,12 +19,12 @@ package org.apache.solr.schema;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.DoubleFieldSource;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.search.cache.CachedArrayCreator; import org.apache.lucene.search.cache.CachedArrayCreator;
import org.apache.lucene.search.cache.DoubleValuesCreator; import org.apache.lucene.search.cache.DoubleValuesCreator;
import org.apache.solr.response.TextResponseWriter; import org.apache.solr.response.TextResponseWriter;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.DoubleFieldSource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -18,11 +18,11 @@
package org.apache.solr.schema; package org.apache.solr.schema;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.FloatFieldSource;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.search.cache.CachedArrayCreator; import org.apache.lucene.search.cache.CachedArrayCreator;
import org.apache.lucene.search.cache.FloatValuesCreator; import org.apache.lucene.search.cache.FloatValuesCreator;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.FloatFieldSource;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.solr.response.TextResponseWriter; import org.apache.solr.response.TextResponseWriter;

View File

@ -19,6 +19,7 @@ package org.apache.solr.schema;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.LiteralValueSource;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.spatial.geohash.GeoHashUtils; import org.apache.lucene.spatial.geohash.GeoHashUtils;
@ -29,7 +30,6 @@ import org.apache.solr.response.TextResponseWriter;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.SolrConstantScoreQuery; import org.apache.solr.search.SolrConstantScoreQuery;
import org.apache.solr.search.SpatialOptions; import org.apache.solr.search.SpatialOptions;
import org.apache.solr.search.function.LiteralValueSource;
import org.apache.solr.search.function.ValueSourceRangeFilter; import org.apache.solr.search.function.ValueSourceRangeFilter;
import org.apache.solr.search.function.distance.GeohashHaversineFunction; import org.apache.solr.search.function.distance.GeohashHaversineFunction;

View File

@ -18,11 +18,11 @@
package org.apache.solr.schema; package org.apache.solr.schema;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.IntFieldSource;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.search.cache.CachedArrayCreator; import org.apache.lucene.search.cache.CachedArrayCreator;
import org.apache.lucene.search.cache.IntValuesCreator; import org.apache.lucene.search.cache.IntValuesCreator;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.IntFieldSource;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.solr.response.TextResponseWriter; import org.apache.solr.response.TextResponseWriter;

View File

@ -22,6 +22,7 @@ import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.VectorValueSource;
import org.apache.lucene.search.*; import org.apache.lucene.search.*;
import org.apache.lucene.spatial.DistanceUtils; import org.apache.lucene.spatial.DistanceUtils;
import org.apache.lucene.spatial.tier.InvalidGeoException; import org.apache.lucene.spatial.tier.InvalidGeoException;
@ -30,7 +31,6 @@ import org.apache.solr.common.SolrException;
import org.apache.solr.response.TextResponseWriter; import org.apache.solr.response.TextResponseWriter;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.SpatialOptions; import org.apache.solr.search.SpatialOptions;
import org.apache.solr.search.function.VectorValueSource;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -19,12 +19,12 @@ package org.apache.solr.schema;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.LongFieldSource;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.search.cache.CachedArrayCreator; import org.apache.lucene.search.cache.CachedArrayCreator;
import org.apache.lucene.search.cache.LongValuesCreator; import org.apache.lucene.search.cache.LongValuesCreator;
import org.apache.solr.response.TextResponseWriter; import org.apache.solr.response.TextResponseWriter;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.LongFieldSource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -20,6 +20,7 @@ package org.apache.solr.schema;
import org.apache.lucene.document.Field; import org.apache.lucene.document.Field;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.VectorValueSource;
import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
@ -32,7 +33,6 @@ import org.apache.solr.common.params.SolrParams;
import org.apache.solr.response.TextResponseWriter; import org.apache.solr.response.TextResponseWriter;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.SpatialOptions; import org.apache.solr.search.SpatialOptions;
import org.apache.solr.search.function.VectorValueSource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -25,11 +25,11 @@ import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.IntDocValues;
import org.apache.lucene.search.*; import org.apache.lucene.search.*;
import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.ReaderUtil;
import org.apache.solr.response.TextResponseWriter; import org.apache.solr.response.TextResponseWriter;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.IntDocValues;
/** /**
* Utility Field used for random sorting. It should not be passed a value. * Utility Field used for random sorting. It should not be passed a value.

View File

@ -18,13 +18,13 @@ package org.apache.solr.schema;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.ShortFieldSource;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.search.cache.CachedArrayCreator; import org.apache.lucene.search.cache.CachedArrayCreator;
import org.apache.lucene.search.cache.ShortValuesCreator; import org.apache.lucene.search.cache.ShortValuesCreator;
import org.apache.solr.response.TextResponseWriter; import org.apache.solr.response.TextResponseWriter;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.ShortFieldSource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -21,12 +21,12 @@ import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueDouble; import org.apache.lucene.common.mutable.MutableValueDouble;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.StringIndexDocValues;
import org.apache.lucene.queries.function.valuesource.FieldCacheSource;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.CharsRef; import org.apache.lucene.util.CharsRef;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.FieldCacheSource;
import org.apache.solr.search.function.StringIndexDocValues;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.solr.util.NumberUtils; import org.apache.solr.util.NumberUtils;

View File

@ -21,12 +21,12 @@ import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueFloat; import org.apache.lucene.common.mutable.MutableValueFloat;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.StringIndexDocValues;
import org.apache.lucene.queries.function.valuesource.FieldCacheSource;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.CharsRef; import org.apache.lucene.util.CharsRef;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.FieldCacheSource;
import org.apache.solr.search.function.StringIndexDocValues;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.solr.util.NumberUtils; import org.apache.solr.util.NumberUtils;

View File

@ -21,12 +21,12 @@ import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueInt; import org.apache.lucene.common.mutable.MutableValueInt;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.StringIndexDocValues;
import org.apache.lucene.queries.function.valuesource.FieldCacheSource;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.CharsRef; import org.apache.lucene.util.CharsRef;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.FieldCacheSource;
import org.apache.solr.search.function.StringIndexDocValues;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.solr.util.NumberUtils; import org.apache.solr.util.NumberUtils;

View File

@ -21,12 +21,12 @@ import org.apache.lucene.common.mutable.MutableValue;
import org.apache.lucene.common.mutable.MutableValueLong; import org.apache.lucene.common.mutable.MutableValueLong;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.StringIndexDocValues;
import org.apache.lucene.queries.function.valuesource.FieldCacheSource;
import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortField;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.CharsRef; import org.apache.lucene.util.CharsRef;
import org.apache.solr.search.QParser; import org.apache.solr.search.QParser;
import org.apache.solr.search.function.FieldCacheSource;
import org.apache.solr.search.function.StringIndexDocValues;
import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.Fieldable;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.solr.util.NumberUtils; import org.apache.solr.util.NumberUtils;

View File

@ -19,8 +19,8 @@ package org.apache.solr.schema;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.solr.search.function.FieldCacheSource; import org.apache.lucene.queries.function.docvalues.StringIndexDocValues;
import org.apache.solr.search.function.StringIndexDocValues; import org.apache.lucene.queries.function.valuesource.FieldCacheSource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -22,6 +22,10 @@ import org.apache.lucene.document.Fieldable;
import org.apache.lucene.document.Field; import org.apache.lucene.document.Field;
import org.apache.lucene.document.NumericField; import org.apache.lucene.document.NumericField;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.DoubleFieldSource;
import org.apache.lucene.queries.function.valuesource.FloatFieldSource;
import org.apache.lucene.queries.function.valuesource.IntFieldSource;
import org.apache.lucene.queries.function.valuesource.LongFieldSource;
import org.apache.lucene.search.*; import org.apache.lucene.search.*;
import org.apache.lucene.search.cache.CachedArrayCreator; import org.apache.lucene.search.cache.CachedArrayCreator;
import org.apache.lucene.search.cache.DoubleValuesCreator; import org.apache.lucene.search.cache.DoubleValuesCreator;

View File

@ -18,13 +18,13 @@ package org.apache.solr.search;
import org.apache.lucene.queries.function.FunctionQuery; import org.apache.lucene.queries.function.FunctionQuery;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.QueryValueSource;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.NamedList;
import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.search.function.BoostedQuery; import org.apache.solr.search.function.BoostedQuery;
import org.apache.solr.search.function.QueryValueSource;
/** /**
* Create a boosted query from the input value. The main value is the query to be boosted. * Create a boosted query from the input value. The main value is the query to be boosted.
@ -34,7 +34,8 @@ import org.apache.solr.search.function.QueryValueSource;
* The query to be boosted may be of any type. * The query to be boosted may be of any type.
* *
* <p>Example: <code>{!boost b=recip(ms(NOW,mydatefield),3.16e-11,1,1)}foo</code> creates a query "foo" * <p>Example: <code>{!boost b=recip(ms(NOW,mydatefield),3.16e-11,1,1)}foo</code> creates a query "foo"
* which is boosted by the date boosting function referenced in {@link org.apache.solr.search.function.ReciprocalFloatFunction} * which is boosted by the date boosting function referenced in
* {@link org.apache.lucene.queries.function.valuesource.ReciprocalFloatFunction}
*/ */
public class BoostQParserPlugin extends QParserPlugin { public class BoostQParserPlugin extends QParserPlugin {
public static String NAME = "boost"; public static String NAME = "boost";

View File

@ -24,6 +24,8 @@ package org.apache.solr.search;
import org.apache.lucene.queries.function.FunctionQuery; import org.apache.lucene.queries.function.FunctionQuery;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.ProductFloatFunction;
import org.apache.lucene.queries.function.valuesource.QueryValueSource;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.*; import org.apache.lucene.search.*;
@ -37,8 +39,6 @@ import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.schema.FieldType; import org.apache.solr.schema.FieldType;
import org.apache.solr.search.QueryUtils; import org.apache.solr.search.QueryUtils;
import org.apache.solr.search.function.BoostedQuery; import org.apache.solr.search.function.BoostedQuery;
import org.apache.solr.search.function.ProductFloatFunction;
import org.apache.solr.search.function.QueryValueSource;
import org.apache.solr.util.SolrPluginUtils; import org.apache.solr.util.SolrPluginUtils;
import org.apache.solr.analysis.*; import org.apache.solr.analysis.*;

View File

@ -18,6 +18,7 @@ package org.apache.solr.search;
import org.apache.lucene.queries.function.FunctionQuery; import org.apache.lucene.queries.function.FunctionQuery;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.*;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.params.SolrParams;

View File

@ -21,6 +21,7 @@ import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.FunctionQuery; import org.apache.lucene.queries.function.FunctionQuery;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.ValueSourceScorer; import org.apache.lucene.queries.function.ValueSourceScorer;
import org.apache.lucene.queries.function.valuesource.QueryValueSource;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.*; import org.apache.lucene.search.*;
import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.params.SolrParams;

View File

@ -24,6 +24,7 @@ import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.FunctionQuery; import org.apache.lucene.queries.function.FunctionQuery;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.QueryValueSource;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.*; import org.apache.lucene.search.*;
import org.apache.lucene.search.grouping.*; import org.apache.lucene.search.grouping.*;
@ -33,7 +34,6 @@ import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.common.util.SimpleOrderedMap;
import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.schema.*; import org.apache.solr.schema.*;
import org.apache.solr.search.function.QueryValueSource;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -19,6 +19,7 @@ package org.apache.solr.search;
import org.apache.lucene.index.Term; import org.apache.lucene.index.Term;
import org.apache.lucene.queries.function.FunctionQuery; import org.apache.lucene.queries.function.FunctionQuery;
import org.apache.lucene.queries.function.valuesource.QueryValueSource;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.queryParser.QueryParser.Operator; import org.apache.lucene.queryParser.QueryParser.Operator;
import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanClause;
@ -44,7 +45,6 @@ import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.schema.FieldType; import org.apache.solr.schema.FieldType;
import org.apache.solr.schema.IndexSchema; import org.apache.solr.schema.IndexSchema;
import org.apache.solr.schema.SchemaField; import org.apache.solr.schema.SchemaField;
import org.apache.solr.search.function.QueryValueSource;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;

View File

@ -21,6 +21,7 @@ import java.util.*;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import org.apache.lucene.queries.function.FunctionQuery; import org.apache.lucene.queries.function.FunctionQuery;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.QueryValueSource;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException;
@ -35,7 +36,6 @@ import org.apache.solr.response.transform.RenameFieldsTransformer;
import org.apache.solr.response.transform.ScoreAugmenter; import org.apache.solr.response.transform.ScoreAugmenter;
import org.apache.solr.response.transform.TransformerFactory; import org.apache.solr.response.transform.TransformerFactory;
import org.apache.solr.response.transform.ValueSourceAugmenter; import org.apache.solr.response.transform.ValueSourceAugmenter;
import org.apache.solr.search.function.QueryValueSource;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@ -20,6 +20,10 @@ import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.index.Term; import org.apache.lucene.index.Term;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.BoolDocValues;
import org.apache.lucene.queries.function.docvalues.DoubleDocValues;
import org.apache.lucene.queries.function.docvalues.LongDocValues;
import org.apache.lucene.queries.function.valuesource.*;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;

View File

@ -35,6 +35,7 @@ import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.index.IndexReader.ReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.util.ReaderUtil;
import org.apache.solr.core.SolrCore; import org.apache.solr.core.SolrCore;

View File

@ -19,8 +19,8 @@ package org.apache.solr.search.function.distance;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.DoubleDocValues;
import org.apache.lucene.spatial.DistanceUtils; import org.apache.lucene.spatial.DistanceUtils;
import org.apache.solr.search.function.DoubleDocValues;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.spatial.geohash.GeoHashUtils; import org.apache.lucene.spatial.geohash.GeoHashUtils;

View File

@ -19,6 +19,11 @@ package org.apache.solr.search.function.distance;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.DoubleDocValues;
import org.apache.lucene.queries.function.valuesource.ConstNumberSource;
import org.apache.lucene.queries.function.valuesource.DoubleConstValueSource;
import org.apache.lucene.queries.function.valuesource.MultiValueSource;
import org.apache.lucene.queries.function.valuesource.VectorValueSource;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.spatial.DistanceUtils; import org.apache.lucene.spatial.DistanceUtils;

View File

@ -19,11 +19,11 @@ package org.apache.solr.search.function.distance;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.DoubleDocValues;
import org.apache.lucene.queries.function.valuesource.MultiValueSource;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.spatial.DistanceUtils; import org.apache.lucene.spatial.DistanceUtils;
import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException;
import org.apache.solr.search.function.DoubleDocValues;
import org.apache.solr.search.function.MultiValueSource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -17,8 +17,8 @@ package org.apache.solr.search.function.distance;
*/ */
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.valuesource.MultiValueSource;
import org.apache.lucene.spatial.DistanceUtils; import org.apache.lucene.spatial.DistanceUtils;
import org.apache.solr.search.function.MultiValueSource;
/** /**

View File

@ -20,8 +20,8 @@ package org.apache.solr.search.function.distance;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.FloatDocValues;
import org.apache.lucene.search.spell.StringDistance; import org.apache.lucene.search.spell.StringDistance;
import org.apache.solr.search.function.FloatDocValues;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -19,11 +19,11 @@ package org.apache.solr.search.function.distance;
import org.apache.lucene.index.IndexReader.AtomicReaderContext; import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.docvalues.DoubleDocValues;
import org.apache.lucene.queries.function.valuesource.MultiValueSource;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.spatial.DistanceUtils; import org.apache.lucene.spatial.DistanceUtils;
import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException;
import org.apache.solr.search.function.DoubleDocValues;
import org.apache.solr.search.function.MultiValueSource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -18,11 +18,11 @@ package org.apache.solr.core;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.SimpleFloatFunction;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.NamedList;
import org.apache.solr.search.FunctionQParser; import org.apache.solr.search.FunctionQParser;
import org.apache.solr.search.ValueSourceParser; import org.apache.solr.search.ValueSourceParser;
import org.apache.solr.search.function.SimpleFloatFunction;
/** /**

View File

@ -19,6 +19,7 @@ package org.apache.solr.search.function;
import org.apache.lucene.queries.function.DocValues; import org.apache.lucene.queries.function.DocValues;
import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.SimpleFloatFunction;
import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.ParseException;
import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.NamedList;
import org.apache.solr.search.FunctionQParser; import org.apache.solr.search.FunctionQParser;