Closed (won't fix)
Project:
Facet API
Version:
7.x-2.x-dev
Component:
Contrib
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 May 2012 at 20:54 UTC
Updated:
12 Aug 2014 at 08:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cpliakas commentedThis is a great feature request. It won't get into the core module, but I believe there is work being done in the Apachesolr Geo sandbox module that will satisfy this request.
Thanks,
Chris
Comment #2
batje commentedThere is a working module as well search_api location demo is here
Comment #3
gnucifer commentedApachesolr Geo is pretty unfinished, but I have forked module here: https://github.com/david-xelera/Apachesolr-geo/tree/david-xelera as I needed this for a customer project. Works great, but I needed to patch facetapi and geofield to get it working (for facetapi I needed query_types to be able to have settings, and for geofield removed the broken apachesolr field mappings implementation). Don't have much time on my hands right now, but stay tuned and I will clean it up some more and provide the required patches.
Comment #4
batje commented@gnucifer I am sure a lot of people would be interested in your progress
Comment #5
nick_vh@gnucifer, I'm also interested in the hacks you performed! Please share
Comment #6
gnucifer commentedOk, here is the patch for facetapi against latest 7.x-1.x-dev (not 7.x-2.x-dev since I was using the 1.x-branch).
Comment #7
gnucifer commentedHere's a patch needed for apachesolr (for sorting by geodistance).
Comment #8
gnucifer commentedAnd here is a patch to comment out all (broken) apachesolr integration in the geofield module. That should be it I think.
Comment #9
cpliakas commentedThanks! Marking as needs review so the testbot can hack at #6.
Also, currently the 7.x-1.x and 7.x-2.x branches are exactly the same :-). Thre has been no 2.x type work, as I feel that 1.x is in good shape and also would benefit from all of my attention right now.
Thanks for sharing!
Chris
Comment #11
cpliakas commentedTests pass for #6, which is the one we care about. Switching back to "needs review".
Comment #12
giorgio79 commentedI notice the patch is based on http://drupal.org/project/date_facets as per the code here https://github.com/david-xelera/Apachesolr-geo/blob/david-xelera/apaches...
Would be best to release it as a Distance Facet module :)
Also found this great snippet http://stackoverflow.com/questions/6035270/faceting-on-distance-in-solr-...
Comment #13
giorgio79 commentedBased on gnucifer's code I started a Distance Facet sandbox here:
http://drupal.org/sandbox/giorgio79/1889026
I added to comaintainers cpliakas, Nick_vh, batje, gnucifer and a few other people, so you can commit right away if you feel like it :)
Any help and comaintainership is appreciated :)
At the moment, it is just a rip of gnucifer's code that I tried to align with Date Facets structure, and it does not work yet.
Comment #14
gnucifer commentedNice! Maybe I'm missing something but I have already implemented a distance facet. I will check though so I don't have un-commited code locally, and that the git-hub version is actually up-to-date.
Comment #15
giorgio79 commentedThanks gnucifer. Your module was geared for ApacheSolr with a distance facet, so I pretty much ripped out the Facet part, and aligned it based on Date Facets module structure. I notice you based your code on Date Facets as well :)
Comment #16
gnucifer commentedAha, I think I actually based some code on the apachesolr-modules facet-api-integration (the date part) :). I am not familiar with the Date Facets module and as you say have focused on Apachesolr-integration. To see it in action, here is a site we made using my branch of the apachesolr_geo-module: http://benders.d7.xelera.biz
(Must search within Sweden, Norway or Finland to get results, so search for "Stockholm" for example.)
Comment #17
giorgio79 commentedI am stuck at converting ApacheSolr addParams to SearchAPI / FacetAPI addFacetFilters. Any tips? Issue at #1891958: What is the equivalent of ApacheSolr addParam in FacetApi / Search API?
Comment #18
bjcone commented@gnucifer,
I would be very interested in your module to expose distance facets. I'm working on a project which requires a proximity search in addition to other exposed facets. I have tried creating my own facet and widget with marginal success. Based on your demo site, what you have looks like what I'm looking for. Is the code available somewhere?
Comment #19
batje commented@bjcone You might want to checkout https://drupal.org/project/search_api_location
Comment #20
gnucifer commented@bjocone
The code is available here: https://github.com/david-xelera/Apachesolr-geo
It's not exactly production ready though as some parts are hardcoded for the specific use-case. Plus I have not ran it against the latest version of the apache solr / facet API modules. I would like to have more time to finish it but it will unfortunately not be in the near future because of other engagements.
Comment #21
cpliakas commentedGreat work all.
Closing as "won't fix" since the code is being worked on elsewhere.
Thanks for the contributions!
Chris