Active
Project:
Get Locations
Version:
7.x-1.15
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2015 at 16:11 UTC
Updated:
21 Mar 2015 at 10:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hutch commentedI don't know "facet".
Comment #2
minu-aswanth commentedHey hutch,
I am using search api + facet api to filter for searching. By facets, I mean the filters displayed in the right side in the attached image.
Comment #3
hutch commentedAll the address and location information stored by Getlocations_fields can be indexed and listed by the Drupal search system and (I'm told) works fine with Apache Solr, so wether it works with Facet or not will depend on how Facet works with the builtin search utilities, which in turn will depend on which modules you are using, a search on the drupal contributed modules list shows a good many modules that work with Facet so find the one(s) that do what you want and you will have a solution.
Comment #4
minu-aswanth commentedThe problem here is that I have indexed the city field in the getlocations fields and I am trying to display a facet based on that but instead of displaying only the cities, it displaying only the cities, it displays everything as shown below.
Comment #5
minu-aswanth commentedThe problem here is that I have indexed the city field in the getlocations fields and I am trying to display a facet based on that but instead of displaying only the cities, it displaying only the cities, it displays everything as shown below.
Comment #6
hutch commentedTo get to the data that you want you need to copy function template_preprocess_search_result() from the file search_pages.inc in the search module to your theme's template.php (renaming it to suit of course) and also copy search-result.tpl.php and optionally search-results.tpl.php to your theme, then you can edit things to get the data you want, in particular look at the
$resultvariable in function template_preprocess_search_result() which contains everything.Comment #7
minu-aswanth commentedHi,
Thanks for the reply, but I dont quite understand why / how this will help. Recently started dabbling with drupal.
I found the template_preprocess_search_result, and search-result.tpl.php, But these are the files that control how the teasers and so on will get displayed. Does this control facet api ?
Also, I am unsure as to what to name the function template_preprocess_search_result as in the template.php file.
Comment #8
hutch commentedFirst of all, this issue queue is for problems with Getlocations and its sub-modules, your problems are to do with the Drupal search system. Getlocations_fields has been written to ensure that all the fields are searcheable and that works fine, any data entered into a getlocations_fields instance can be found by the search module. What you are apparently doing is trying to extend the search module with a third-party package called "Facet" and it is not working the way you expect it to. This has nothing to do with Getlocations, you need to read the documentation that comes with Facet, if any.
If you want to know more about how to use Drupal I would suggest that you read the documentation pages. There is a whole section on theming and it is there that you will find out how to rename things (hint: same as all the other examples in template.php, have a look at the builtin themes)