Examples of QueryValueSource


Examples of org.apache.lucene.queries.function.valuesource.QueryValueSource

        new ConstValueSource(2f), new ConstValueSource(3f)})),
        new float[] { 6f, 6f });
  }
 
  public void testQuery() throws Exception {
    assertHits(new FunctionQuery(new QueryValueSource(
        new FunctionQuery(new ConstValueSource(2f)), 0f)),
        new float[] { 2f, 2f });
  }
View Full Code Here

Examples of org.apache.lucene.queries.function.valuesource.QueryValueSource

        new ConstValueSource(2f), new ConstValueSource(3f)})),
        new float[] { 6f, 6f });
  }
 
  public void testQuery() throws Exception {
    assertHits(new FunctionQuery(new QueryValueSource(
        new FunctionQuery(new ConstValueSource(2f)), 0f)),
        new float[] { 2f, 2f });
  }
View Full Code Here

Examples of org.apache.solr.search.function.QueryValueSource

        Query boost = subQuery(boostStr, FunctionQParserPlugin.NAME).getQuery();
        ValueSource vs;
        if (boost instanceof FunctionQuery) {
          vs = ((FunctionQuery)boost).getValueSource();
        } else {
          vs = new QueryValueSource(boost, 1.0f);
        }
        boosts.add(vs);
      }

      if (boosts.size()>1) {
View Full Code Here

Examples of org.apache.solr.search.function.QueryValueSource

            if (null != top) {
              // we have a Query and a valid direction
              if (q instanceof FunctionQuery) {
                lst.add(((FunctionQuery)q).getValueSource().getSortField(top));
              } else {
                lst.add((new QueryValueSource(q, 0.0f)).getSortField(top));
              }
              continue;
            }
          } catch (IOException ioe) {
            throw ioe;
View Full Code Here

Examples of org.apache.solr.search.function.QueryValueSource

        if (b == null) return q;
        Query bq = subQuery(b, FunctionQParserPlugin.NAME).getQuery();
        if (bq instanceof FunctionQuery) {
          vs = ((FunctionQuery)bq).getValueSource();
        } else {
          vs = new QueryValueSource(bq, 0.0f);
        }
        return new BoostedQuery(q, vs);
      }

View Full Code Here

Examples of org.apache.solr.search.function.QueryValueSource

        if (b == null) return q;
        Query bq = subQuery(b, FunctionQParserPlugin.NAME).parse();
        if (bq instanceof FunctionQuery) {
          vs = ((FunctionQuery)bq).getValueSource();
        } else {
          vs = new QueryValueSource(bq, 0.0f);
        }
        return new BoostedQuery(q, vs);
      }

View Full Code Here

Examples of org.apache.solr.search.function.QueryValueSource

            if (null != top) {
              // we have a Query and a valid direction
              if (q instanceof FunctionQuery) {
                lst.add(((FunctionQuery)q).getValueSource().getSortField(top));
              } else {
                lst.add((new QueryValueSource(q, 0.0f)).getSortField(top));
              }
              continue;
            }
          } catch (ParseException e) {
            // hang onto this in case the string isn't a full field name either
View Full Code Here

Examples of org.apache.solr.search.function.QueryValueSource

        if (b == null) return q;
        Query bq = subQuery(b, FunctionQParserPlugin.NAME).parse();
        if (bq instanceof FunctionQuery) {
          vs = ((FunctionQuery)bq).getValueSource();
        } else {
          vs = new QueryValueSource(bq, 0.0f);
        }
        return new BoostedQuery(q, vs);
      }

View Full Code Here

Examples of org.apache.solr.search.function.QueryValueSource

        if (b == null) return q;
        Query bq = subQuery(b, FunctionQParserPlugin.NAME).parse();
        if (bq instanceof FunctionQuery) {
          vs = ((FunctionQuery)bq).getValueSource();
        } else {
          vs = new QueryValueSource(bq, 0.0f);
        }
        return new BoostedQuery(q, vs);
      }

View Full Code Here

Examples of org.apache.solr.search.function.QueryValueSource

        MatchAllDocsQuery query = new MatchAllDocsQuery();
        QueryResultKey queryResultKey =
            new QueryResultKey(query, new ArrayList<Query>(), new Sort(), 1 );

        solrOffHeapCache.put( queryResultKey, new QueryValueSource(query,1) );

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.