down votefavorite
<http://stackoverflow.com/questions/39739430/solr-spatial-search-not-returning-any-results-in-response-element#>

I am using Solr version 6.2.1 and trying to return closest location for a
given latitude and longitude.

I have manage to add data into Solr and indexed it.

My data file (.CSV) is in this format:

id,areaname,geo,country,state
1125257,"Mumbai","18.9750,72.8258","India","Maharashtra"
1125258,"Mumgaon","26.3833,93.4833","India","Assam"
1125259,"Mummasar","28.2167,74.2833","India","Rajasthan"
1125260,"Mummidivaram","16.6500,82.1167","India","Andhra Pradesh"
1125261,"Munaba","25.7500,70.2833","India","Rajasthan"
1125262,"Munabao","25.7500,70.2833","India","Rajasthan"
1125263,"Munabo","25.7500,70.2833","India","Rajasthan"
1125264,"Munagala","17.0500,79.8333","India","Andhra Pradesh"

Under managed-schema file following fields are setup:

<fieldType name="location" class="solr.LatLonType"
subFieldSuffix="_coordinate"/>

and field geo as:

<field name="geo" type="location" indexed="true" stored="true" />
<field name="geo_0_coordinate" type="tdouble" indexed="true" stored="false" />
<field name="geo_1_coordinate" type="tdouble" indexed="true" stored="false" />

Now when I am running my query to find closest location, it is returning
nothing in response element.

{!geofilt sfield=geo}&pt=28.2167,74.2833&d=100

No error in logs and data is indexed.

Please could someone explain me as to why this is not working.

Thanks.


A

Reply via email to