Re: displaying search results in map

2012-10-11 Thread Jamie Johnson
Did you look at
http://stackoverflow.com/questions/11319465/geoclusters-in-solr?  This
sounds similar to what you're asking for based on geohashes of the
points of interest.

On Thu, Oct 11, 2012 at 2:25 PM, Harish Rawat  wrote:
> Sorry for not being clear. Here are more details
>
> 1.) The results are displayed in geographical map
> 2.) Each document has latitude,  longitude field and other fields that can
> be searched on
> 3.) The search will be done for all documents within a lat/long range.
> 4.) The lat/lon range is divided into N*N (lets say 64 grids) and for each
> grid we want following
> a) no. of documents in that grid
> b.) top K documents in that grid
> c.) avg of latitude and longitude value for all results in that grid
>
> In lucene I can implement my own custom collector and do all the
> calculations listed in #4. I wanted to understand the best way to implement
> (or use existing if any :) this logic in solr
>
> Regards
> Harish
>
>
>
> On Thu, Oct 11, 2012 at 11:08 AM, Gora Mohanty  wrote:
>
>> On 11 October 2012 23:16, Harish Rawat  wrote:
>>
>> > Hi
>> >
>> > I am working on a project to display the search results on the map. The
>> > idea is to divide the map into N*N grids and show counts for each grid
>> and
>> > allow users to view top result on each grid
>> >
>> > any suggestions on how best to accomplish this with solr?
>> >
>>
>> Your description is not very clear. What search results
>> are you seeking to display on what kind of a map? Are you
>> talking about a geographical map, or something like a 3D
>> histogram (which is what you N x N grid seems to refer to)?
>> Please clarify.
>>
>> In either case, it is quite unlikely that Solr will handle the
>> presentation for you. Solr is a search engine that will return
>> you desired search results. What to do with the search results
>> is an issue for a presentation layer.
>>
>> Regards,
>> Gora
>>


Re: displaying search results in map

2012-10-11 Thread Gora Mohanty
On 11 October 2012 23:55, Harish Rawat  wrote:

> Sorry for not being clear. Here are more details
>
> 1.) The results are displayed in geographical map
> 2.) Each document has latitude,  longitude field and other fields that can
> be searched on
> 3.) The search will be done for all documents within a lat/long range.
> 4.) The lat/lon range is divided into N*N (lets say 64 grids) and for each
> grid we want following
> a) no. of documents in that grid
> b.) top K documents in that grid
> c.) avg of latitude and longitude value for all results in that grid
>
> In lucene I can implement my own custom collector and do all the
> calculations listed in #4. I wanted to understand the best way to implement
> (or use existing if any :) this logic in solr
>
[...]

Hmm, I am  not that familiar with Lucene, so maybe someone
else will chip in with advice.

However, what you describe in point 4 seems to be a clustering
strategy for geographical points. Typically, we use pre-defined
strategies from OpenLayers ( http://openlayers.org ), or custom
strategies.

Regards,
Gora


Re: displaying search results in map

2012-10-11 Thread Gora Mohanty
On 11 October 2012 23:16, Harish Rawat  wrote:

> Hi
>
> I am working on a project to display the search results on the map. The
> idea is to divide the map into N*N grids and show counts for each grid and
> allow users to view top result on each grid
>
> any suggestions on how best to accomplish this with solr?
>

Your description is not very clear. What search results
are you seeking to display on what kind of a map? Are you
talking about a geographical map, or something like a 3D
histogram (which is what you N x N grid seems to refer to)?
Please clarify.

In either case, it is quite unlikely that Solr will handle the
presentation for you. Solr is a search engine that will return
you desired search results. What to do with the search results
is an issue for a presentation layer.

Regards,
Gora