Do not show all result for same lat, lon search

7 views
Skip to first unread message

manish kumar

unread,
Mar 19, 2017, 9:41:59 AM3/19/17
to Aurelius
I have this indexing


        PropertyKey postGeoLocation = mgmt.makePropertyKey(PublishMessageVertices.VertexProps.postGeoLocCordinates.toString()).dataType(Geoshape.class).make();

        mgmt.buildIndex("IndxPostGeoByPostTime", Vertex.class)
                .addKey(postGeoLocation, Parameter.of("mapped-name", "postGeoLoc"))
                .addKey(postTime, Parameter.of("mapped-name", "postGeoLocTime"))
                .buildMixedIndex("search");  
        
        mgmt.buildIndex("IndxPostGeoByPostTimeAndTag", Vertex.class)
                .addKey(postGeoLocation, Parameter.of("mapped-name", "postGeoTagLoc"))
                .addKey(postTime, Parameter.of("mapped-name", "postGeoTagLocTime"))
                .addKey(tag, Parameter.of("mapped-name", "postGeoTag"))
                .buildMixedIndex("search");
        
        mgmt.buildIndex("IndxPostGeoByPostTimeAndUpvote", Vertex.class)
                .addKey(postGeoLocation, Parameter.of("mapped-name", "postGeoLocUpvote"))
                .addKey(postTime, Parameter.of("mapped-name", "postGeoLocTimeUpvote"))
                .addKey(postUpvoteCount, Parameter.of("mapped-name", "postGeoLocUpvoteCount"))
                .buildMixedIndex("search");

I hve this query:

        Iterator<TitanVertex> iterator = instances.getGraph()
                .query()
                .has(PublishMessageVertices.VertexProps.postGeoLocCordinates.toString(), Geo.WITHIN, Geoshape.circle(lat, lon, range))
                .has(PublishMessageVertices.VertexProps.postTime.toString(), LESS_THAN, page)                
                .orderBy(PublishMessageVertices.VertexProps.postTime.toString(), Order.decr)
                .has(PublishMessageVertices.VertexProps.postEndTagId.toString(), tag)
                .limit(AppConstants.PAGINATION_SIZE)
                .vertices()
                .iterator();     

What I see that for the same lat, lon : it show some result for 1km range , some result when i make range 20km. how can it return different out for the same lat lon and ?
Reply all
Reply to author
Forward
0 new messages