Although this module theoretically supports location fields other than openlayers wkt (through the hook_build_proximity_index() function), the Batch API operation that actually rebuilds the index uses openlayers_proximity_get_types(), which limits the content types that get indexed to only 'openlayers_wkt' fields.
I'll try to think of a way to refactor the hook_build_proximity_index() and openlayers_proximity_get_types() functions to solve this.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | openlayers_proximity-918290.patch | 2.12 KB | tom_o_t |
Comments
Comment #1
ademarco commentedThat's right. Instead of a direct call to openlayers_proximity_get_types() the batch api should invoke a hook to get the content types the index should be rebuilt for. openlayers_proximity_get_types() is indeed openlayers_proximity's implementation of such a hook. Something like:
And then openlayers_proximity_get_types() becomes:
Comment #2
tom_o_t commentedCool - I'll submit a patch for this soon.
Comment #3
tom_o_t commentedPatch attached - implements hook_openlayers_proximity_get_types().
I also changed the query that selects node by type to use db_placeholders() so that the types array is handled properly.
Comment #4
ademarco commentedGreat! Thanks for patching! Committed: http://drupal.org/cvs?commit=425506
Comment #6
Marko B commentedDoes this work with location module, i am trying to index but nothing is happening and i keep getting 0 indexes and then i guess prox. search doesnt work because of it?