Hi there,
I'm a cofounder of http://websolr.com/ and we have some customers who would like to use the Search API Location module.
Unfortunately, we don't support the LocalSolr plugin for adding spatial search API to Solr 1.4, due to stability issues at scale. Fortunately, Solr 3 has since been released with an official spatial search API. We regularly encourage any of our customers who rely on spatial search to choose Solr 3 over Solr 1.4.
What would it take to support Solr 3 and its official spatial search API in the Search API Location module? Since LocalSolr was theoretically a backport of the Solr 3 spatial API, the changes may be minimal. In fact I'm wondering if all it would take is an alternative schema.xml for installs on Solr 3, using the new solr.LatLonType class.
Let me know if there is anything I can do to encourage or support any effort to support Solr 3 in your module. Cheers!
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 1288642-native-solr.patch | 84.37 KB | wesnick |
| #5 | 1328490-5-search_api_solr.patch | 4.18 KB | wesnick |
| #4 | 1328490-search_api_solr.patch | 3.86 KB | wesnick |
| #4 | 1328490-search_api_location.patch | 9.53 KB | wesnick |
Comments
Comment #1
ygerasimov commentedThere is some work done for integration of Search API with Solr 3.x here http://drupal.org/sandbox/mollux/1269950
I hope to merge that sandbox into this module and continue development for Solr 3.x.
Comment #2
wesnick commentedI am currently working on a patch that will do this, expanding on mollux's work.
@ygerasimov, do you have a problem with removing the dependency on the location module? My thought is that is could use any module/field that provides lat/lng data, such as geofield.
Also, should I post patches here, or start a new ticket?
Comment #3
ygerasimov commented@wesnick I don't see any problem to remove dependency on location module. Only thing that should be done is to index geofield properly.
You are welcome to add patch here.
Comment #4
wesnick commentedHere is a patch with some initial ideas. Requires patching of search_api_solr module as well as search_api_location. Please let me know if you think this is a good direction or if you have other implementation ideas.
Comment #5
wesnick commentedWhoops, forgot to add in the the parameter merge in solr search.
EDIT: Also worth mentioning that for this to work, a field or module must define a suitable property. Geofield has this property, and in general it can be added to any entity/field using something like this in property_info callback.
With a corresponding getter
Comment #6
mollux commented@ygerasimov and @wesnick, I will commit my code as soon as possible. Then we can merge the whole thing :)
Comment #7
Adam S commentedI am very interested in this and will be testing the patches.
Comment #8
nrambeck commentedI am working on a project with Search API, Solr and Geofield, so I can test the patches in that context. After spending several days digging into Geospatial search with Solr and Geofield, I like the direction of the patches from wesnick.
Comment #9
Anonymous (not verified) commentedI am really excited about this module. I use Location with gecoded longitude/latitude for a product search. I hope Location support will exist alongsite Geofield support? Just index any combination of long/lat fields, right?
By the way, maybe not rely on Gmap, but allow for any mapping system. I love OpenLayers for plotting Views data on maps. But that should probably not be an issue. You can already use Openlayers Views for Solr Indexes. Just waiting to add the Spatial sauce :=)
Comment #10
mollux commentedcode is cleaned up :) when I'm home tonight, I will push to my sandbox, and then we can start the merging.
@morningtime: If Location kan output a latlon field, then there is no problem :)
i'm also a fan of openlayers :) I think the best solution is to let the user choose if he wants a gmap map (current implementation) or select an openlayers map for picking the point and showing the results.
I have the code for both :)
Comment #11
wesnick commentedHi,
I put some work into this, and have it basically working on views and search_api_pages. I have commented (temporarily) the location module integration stuff since in its current state location doesn't integrate well with Entity API-- is it a field, an entity? And it seems they are moving towards a pure field implementation, but not there yet, so I have only worked with:
Geofield
Geolocation
Simplegeo
To work with geolocation I have added a patch for that module #1366642: Property Info callback for Entity API.
I have also made an input widget with a gmap, implemented natively, following the patterns of geolocation field and mollux's work on search_api_spatial sandbox.
This will work with search api pages and with search api views, though not all the options that appear have been fully implemented.
@morningtime: you can only query one spatial index per query. You can do multiple points against the same index, but as far as I know you can't search against multiple spatial fields in a single query.
Please give some feedback.
Comment #12
Adam S commentedWhy not use Geocode? Did you not want to get stuck with Google?
Comment #13
larjohn commentedIs there any estimation about a prerelease date?
Before or after this Christmas?
Comment #14
mollux commented@larjon: it will be before Christmas :) I'm almost finished with the renaming process, and the the 7.x-2.x branch of this module will contain the code of http://drupal.org/sandbox/mollux/1269950
Comment #15
grasmash commentedLooking forward to it!
Comment #16
mollux commentedI committed the renamed version of the search_api_spatial module to the 7.x-2.x branch.
So we have full support for the spatial search possibilities of Solr.
I have some free evenings the next weeks, so I will be working on the module.
feel free to test it :)