solr-node-client icon indicating copy to clipboard operation
solr-node-client copied to clipboard

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

Open gkozlenko opened this issue 10 years ago • 2 comments

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.

gkozlenko avatar Jun 15 '15 21:06 gkozlenko

Hi there,

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

ColadaFF avatar Jul 22 '15 05:07 ColadaFF

Would love to see this merged once tests are written.

lstone avatar Dec 05 '15 01:12 lstone