Examples of makeQuery()


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.TermQueryPrefixTreeStrategy.makeQuery()

    addDocument(doc);

    Point upperleft = ctx.makePoint(-122.88, 48.54);
    Point lowerright = ctx.makePoint(-122.82, 48.62);

    Query query = strategy.makeQuery(new SpatialArgs(SpatialOperation.Intersects, ctx.makeRectangle(upperleft, lowerright)));

    commit();

    TopDocs search = indexSearcher.search(query, 10);
    ScoreDoc[] scoreDocs = search.scoreDocs;
View Full Code Here

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

    addDocument(doc);

    Point upperleft = ctx.makePoint(-122.88, 48.54);
    Point lowerright = ctx.makePoint(-122.82, 48.62);

    Query query = strategy.makeQuery(new SpatialArgs(SpatialOperation.Intersects, ctx.makeRectangle(upperleft, lowerright)));

    commit();

    TopDocs search = indexSearcher.search(query, 10);
    ScoreDoc[] scoreDocs = search.scoreDocs;
View Full Code Here

Examples of whitedb.driver.WhiteDB.makeQuery()

        record = db.getNextRecord(record);
        System.out.println("Next record pointer: " + record);

        ArgListEntry[] arglist = new ArgListEntry[1];
        arglist[0] = new ArgListEntry(0, db.COND_GREATER, 50);
        Query query = db.makeQuery(arglist);
        record = db.fetchQuery(query);
        while(record != null) {
            System.out.println("Fetched record: " + record.pointer);
            System.out.println("Get field 0 value: " + db.getIntFieldValue(record, 0));
            record = db.fetchQuery(query);
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.