Skip to content

Added an ability to search using geo-spatial queries and filter documents by expression#136

Open
gkozlenko wants to merge 2 commits into
lbdremy:masterfrom
hwdmedia:master
Open

Added an ability to search using geo-spatial queries and filter documents by expression#136
gkozlenko wants to merge 2 commits into
lbdremy:masterfrom
hwdmedia:master

Conversation

@gkozlenko
Copy link
Copy Markdown

I've added two methods to Query module for geo-spatial search:

  • spatial
  • expressionFilter

Basic usage:

var solr = require('./../lib/solr');
var client = solr.createClient();
var query = client.createQuery()
    .spatial({
        pt: '37.7749295,-122.4194155',
        sfield: 'location_srpt',
        d: 10
    }).expressionFilter('{!geofilt}');

It will find all documents which are located in 10 km radius of the chosen point.

@ColadaFF
Copy link
Copy Markdown
Collaborator

Hi there,

Can you add the tests for this feature?
Then I can merge the pull request.

@lstone
Copy link
Copy Markdown

lstone commented Dec 5, 2015

Would love to see this merged once tests are written.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants