I followed instructions on installing the search api location module everything is in place including the path to the "Search Api Module" , Solr is running with new schema, here are the steps to reproduce
- on Search Api page clicked on edit my already added Index and selected fields from a dropdown
- scrolled to the bottom, clicked on related fields, the select box does not show Location ( see screenshot )
Details ( copied from my index )
Places Index
Status
enabled (disable)
Machine name
places_index
Item type
Node
Server
Solr Server
Index options
Cron batch size
50 items per cron batch.
Indexed fields
Node ID, Title (8.0 x), URL, Status, Date created, Author, Comments allowed, Comment count, Precio, Tarjetas, Estacionamiento, Wi-Fi, Accesible, Categoria, Item language, URI, The main body text » Text (3.0 x), The main body text » Summary (5.0 x)
Configuration status
Custom
here is a screenshot of my node fields
I'm using the Location Module not sure if thats the problem.
TL;DR; - Location isn't showing up on the dropbox on the bottom of the fields when you add/update an Index
URL's of images here ( for some reason Drupal isn't playing nice with dropbox )
http://dl.dropbox.com/u/9694286/location_field_missing.png
http://dl.dropbox.com/u/9694286/location_node_fields.png
Comments
Comment #0.0
rroche CreditAttribution: rroche commentedAdding links to the images since drupal is displaying a watchdog error
Comment #1
l0calh0rst CreditAttribution: l0calh0rst commentedHaving the exact same problem.
The only filed type that actually has an effect on the select field is the geofield type. But that does not seem to work for the searches. My search pages return no result using this field type.
Comment #2
billiaug CreditAttribution: billiaug commentedDid you allready manage to get results?
The module and search works fine over here, I'm just not getting any results.
Thanks!
Comment #3
drunken monkeyPlease see whether the problem still occurs with the latest versions of all concerned modules.
Comment #3.0
drunken monkeyremoved width and height from images since Drupal isn't displaying the images, leaving images since it might be a bug and could be resolved in the future
Comment #4
nasia123 CreditAttribution: nasia123 commentedI am also using the location module and cannot find any location fields in the dropdown list to add fields to the index.
I would only like to get the list of countries and not do a spatial search though, so maybe my issue is different than the one posted here
Comment #5
drunken monkeyThe Location module doesn't currently work with this module anyways, you have to use Geofield for that.
And the described problem sounds like Location hasn't got proper Entity API integration for their fields, which would have to be solved there. Or does the field appear in the normal list of fields instead, maybe? If not, please move this issue to the Location module. The Entity API integration of Geofield could be a blueprint for them.
Comment #6
FortEZ CreditAttribution: FortEZ commentedIt actually works. You just need to enable the "Location Entity" submodule of Location. I haven't tested it extensively, but at least it makes the "Address" field available in the index.
Comment #7
nasia123 CreditAttribution: nasia123 commentedA field "address information" appears in the normal list of fields.It also appears in the list of fields in a search view I have created.
I've tested this by adding this field and also making it available as a facet, so I could have A filter by country for example.
After I re-index content, I get empty results for the location fields (the facets are not even visible for the nodes that I am certain I have location field set correctly)
Comment #8
Perignon CreditAttribution: Perignon commentedThe Location module doesn't seem to work with search_api_location.
I'm trying to see if I can actually make it work. It is a simple problem I believe. Geofield stores the LatLong in one field as a comma deli mitered string. Location module stores the LatLong in two numerical fields.
Comment #9
Perignon CreditAttribution: Perignon commentedCan someone help me out here by pointing me in the right direction. I would love to modify and submit those modification so that this module could be more agnostic in the geo location type fields it accepts. I would like to modify it so it can accept a longitude and latitude as separate fields or as a latlong pair. Geofield itself actually stores lat long in this way as well as offering it as a pair. This simple modification would allow this module to support the "Location" module as well as "Geofield". The "Apachesolr" module supports Location but I believe the "Search API" module to offer some advantages of that module, hence my desire to help here.
Being brand new to this module I am trying to understand what mechanism is used to provide the fields to the Search API for sending to Solr. It seems that is where this is breaking. When I attempt to use separate fields for lat & long, the Re-index fails in Solr because wherever the field is being processed it's looking for a comma in the field.
Comment #10
Perignon CreditAttribution: Perignon commentedSome investigating into this. It seems the problem and solution to this resides with the location module. Apache Solr only indexes latitude and longitude data in a LatLong pair. So the "Location" module will have to be modified to create a field that is a LatLong pair. It just so happens that the "Location" module already does this via views. The have written a views handler to create a LatLong pair. I'll take this discussion to the "Location" module and start a feature request there.
Comment #11
drunken monkeyHave you started a feature request in the Location module? If so, please link here! The probably easiest solution would be if the Location Entity module would add another (computed, not stored) field to the entity containg a comma-separated lat/long pair.
Otherwise, we could a data alteration to this module which would add that field for us – however, this would be a bit more complicated for the site builders then. As a less clean option, we could also use an alter hook to add that field to the entity definition ourselves in a hard-coded way.
Comment #12
Perignon CreditAttribution: Perignon commentedI been actually moving away from the Location module as the other GIS modules for Drupal (geofield, geocoder, and geolocation) offer what I been needing and integrate with the Addressfield module which I already have all over my site and in Drupal Commerce. Additionally - undocumented - the GMap module will work with geofield/geolocation modules too. So I kinda let this ball drop because I found other ways to do this without using the Location module.
Comment #13
sardbaba CreditAttribution: sardbaba commented@fortez Thank you so much for https://www.drupal.org/node/1480906#comment-8308679
Comment #14
vladbo CreditAttribution: vladbo commentedYou can use this module + Seach API Solr + Location field - use aggregation field to grab Location:latitude and Location:longitude (full text aggregation), then modify this field in hook_search_api_solr_documents_alter() because it will index in format "latitude longitude" and Solr wants "latitude, longitude". To get results in Solr use Bounding-box filter e.g. http://d7.loc:8080/solr/select/?wt=json&indent=true&q=*:*&fq={!bbox}&sfield=locs_search_api_aggregation_5&pt=42.933693,-72.278142&d=5
Comment #15
Chetna_Negi CreditAttribution: Chetna_Negi commentedThanks FortEZ for your comment, it helped.
https://www.drupal.org/node/1480906#comment-8308679 made my work.
Comment #16
Summit CreditAttribution: Summit commentedThis comment https://www.drupal.org/node/1480906#comment-8308679 helped me a lot also. Thanks for sharing!
Greetings, Martijn
Comment #17
beautifulmindI already have the location entity module enabled, but still the issue persists.
I have latest version of all the related modules.
Any work around this? ]
Regards.
Comment #18
gambryLocation module by itself doesn't provide any value ready to be indexed. If you have this issue (and if you do this is not on topic) please follow #14 or check issue 1723762.
If you have the original topic issue please try to enable location_entity module and refresh your cache. If problem persist check on the location module issue queue.