Package org.apache.solr.search.function

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


            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

        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

        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

            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

        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

        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

        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

Related Classes of org.apache.solr.search.function.QueryValueSource

Copyright © 2018 www.massapicom. 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.