Examples of makeQuery()


Examples of org.apache.lucene.benchmark.byTask.feeds.QueryMaker.makeQuery()

   
    if (withSearch()) {
      res++;
      IndexSearcher searcher = new IndexSearcher(ir);
      QueryMaker queryMaker = getQueryMaker();
      Query q = queryMaker.makeQuery();
      Hits hits = searcher.search(q);
      //System.out.println("searched: "+q);
     
      if (withTraverse()) {
        Document doc = null;
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.feeds.QueryMaker.makeQuery()

   
    if (withSearch()) {
      res++;
      IndexSearcher searcher = new IndexSearcher(ir);
      QueryMaker queryMaker = getQueryMaker();
      Query q = queryMaker.makeQuery();
      Hits hits = searcher.search(q);
      //System.out.println("searched: "+q);
     
      if (withTraverse() && hits!=null) {
        int traversalSize = Math.min(hits.length(), traversalSize());
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.feeds.QueryMaker.makeQuery()

    if (withSearch()) {
      res++;
      IndexSearcher searcher = new IndexSearcher(ir);
      QueryMaker queryMaker = getQueryMaker();
      Query q = queryMaker.makeQuery();
      Sort sort = getSort();
      Hits hits;
      if(sort != null) {
        hits = searcher.search(q, sort);
      } else {
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.feeds.QueryMaker.makeQuery()

        searcher = new IndexSearcher(ir);
      } else {
        searcher = getRunData().getIndexSearcher();
      }
      QueryMaker queryMaker = getQueryMaker();
      Query q = queryMaker.makeQuery();
      Sort sort = getSort();
      TopDocs hits;
      final int numHits = numHits();
      if (numHits > 0) {
        if (sort != null) {
View Full Code Here

Examples of org.apache.lucene.spatial.prefix.PrefixTreeStrategy.makeQuery()

            Filter intersects = strategy.makeFilter(getArgs(shape, ShapeRelation.INTERSECTS));
            bool.add(exists, BooleanClause.Occur.MUST);
            bool.add(intersects, BooleanClause.Occur.MUST_NOT);
            query = new ConstantScoreQuery(bool);
        } else {
            query = strategy.makeQuery(getArgs(shape, shapeRelation));
        }
        query.setBoost(boost);
        if (queryName != null) {
            parseContext.addNamedQuery(queryName, query);
        }
View Full Code Here

Examples of org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy.makeQuery()

    String writeSpatialArgs = SpatialArgsParser.writeSpatialArgs(args, shapeReadWriter);

    // This has to be done because of rounding.
    SpatialArgs spatialArgs = SpatialArgsParser.parse(writeSpatialArgs, shapeReadWriter);
    Query q1 = sq(strategy.makeQuery(spatialArgs));
    Query q = parseSq("a.id_gis:\"" + writeSpatialArgs + "\"");
    boolean equals = q1.equals(q);
    assertTrue(equals);
  }
 
View Full Code Here

Examples of org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy.makeQuery()

    SpatialPrefixTree grid = new GeohashPrefixTree(ctx, maxLevels);
    RecursivePrefixTreeStrategy strategy = new RecursivePrefixTreeStrategy(grid, "a.id_gis");
    Circle circle = ctx.makeCircle(-80.0, 33.0, DistanceUtils.dist2Degrees(10, DistanceUtils.EARTH_MEAN_RADIUS_KM));
    SpatialArgs args = new SpatialArgs(SpatialOperation.Intersects, circle);
   
    Query q1 = sq(strategy.makeQuery(args));
    Query q = parseSq("a.id_gis:\"Intersects(Circle(33.000000,-80.000000 d=10.0km))\"");
    boolean equals = q1.equals(q);
    assertTrue(equals);
  }
 
View Full Code Here

Examples of org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy.makeQuery()

    SpatialPrefixTree grid = new GeohashPrefixTree(ctx, maxLevels);
    RecursivePrefixTreeStrategy strategy = new RecursivePrefixTreeStrategy(grid, "a.id_gis");
    Circle circle = ctx.makeCircle(-80.0, 33.0, DistanceUtils.dist2Degrees(10, DistanceUtils.EARTH_MEAN_RADIUS_MI));
    SpatialArgs args = new SpatialArgs(SpatialOperation.Intersects, circle);
   
    Query q1 = sq(strategy.makeQuery(args));
    Query q = parseSq("a.id_gis:\"Intersects(Circle(33.000000,-80.000000 d=10.0m))\"");
    boolean equals = q1.equals(q);
    assertTrue(equals);
  }
 
View Full Code Here

Examples of org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy.makeQuery()

    String writeSpatialArgs = SpatialArgsParser.writeSpatialArgs(args, shapeReadWriter);

    // This has to be done because of rounding.
    SpatialArgs spatialArgs = SpatialArgsParser.parse(writeSpatialArgs, shapeReadWriter);
    Query q1 = sq(strategy.makeQuery(spatialArgs));
    Query q = parseSq("a.id_gis:\"" + writeSpatialArgs + "\"");
    boolean equals = q1.equals(q);
    assertTrue(equals);
  }
View Full Code Here

Examples of org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy.makeQuery()

    SpatialPrefixTree grid = new GeohashPrefixTree(ctx, maxLevels);
    RecursivePrefixTreeStrategy strategy = new RecursivePrefixTreeStrategy(grid, "a.id_gis");
    Circle circle = ctx.makeCircle(-80.0, 33.0, DistanceUtils.dist2Degrees(10, DistanceUtils.EARTH_MEAN_RADIUS_KM));
    SpatialArgs args = new SpatialArgs(SpatialOperation.Intersects, circle);

    Query q1 = sq(strategy.makeQuery(args));
    Query q = parseSq("a.id_gis:\"Intersects(Circle(33.000000,-80.000000 d=10.0km))\"");
    boolean equals = q1.equals(q);
    assertTrue(equals);
  }
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.