Hi,

I am trying to use Search API to make a search on geolocated (with Geolocation module) and dated nodes. I so will have to heavily customize my indexed fields and facets/widgets. Perhaps it should be easier with views but the site will have thousands of nodes, so I'd rather avoid it.

To begin I just added a link field (from link module) to my nodes but it does not appear in field list nor in Entity list. I think it does not appears in the field list since there is more than one field (3 fields in the node form).

Is it because link is not seen as an entity ?

Another question (sorry for it) : Do you think i can manage to build a calendar and a map facet (quite easily, not with 1 month a work) ? Otherwise I will be forced to use only Views and not a search index....

Thanks,

Comments

supportPIC’s picture

Ok, link is ok now (it directly appears in the field list) but another simple field, phone cck, does not appear

drunken monkey’s picture

Another question (sorry for it) : Do you think i can manage to build a calendar and a map facet (quite easily, not with 1 month a work) ? Otherwise I will be forced to use only Views and not a search index....

I haven't really worked with any of this, and in any case, this will depend on a lot of things. How should the facets look exactly? Should they just list date ranges or map regions, or should they be graphical or table displays? Especially for the map, the display/UI could be a lot of work. Also I have no idea how geolocation data is stored and indexed. Do you use Solr with an extension for geo search? This would make things a lot easier …
I think that the calendar facets should be feasible, if your requirements aren't overly complex. If you come up with a good solution, I might even add it right to the Solr module. (It would have to change SolrService::getFacetParams() to add special facet settings if the facet field has type "date".)
WIth Geolocation I haven't really worked, but this one could be pretty hard to do, depending on your requirements and what you can work with.)

Ok, link is ok now (it directly appears in the field list) but another simple field, phone cck, does not appear

Is this a text field, or some custom field? I don't really know, but I think Entity API doesn't support all custom fields right out-of-the-box. In that case, you'd have to ask what you'll have to do to make this work.

supportPIC’s picture

Thanks for your answer.

Yeah the question was how make detected a custom field supported by entityApi....

Concerning the widgets, they are a calendar (or two if user want a time range) to select day and hours and a map to select a point and a radius.
The thing is that is not exactly like facets (that depend of/classify the results a the search) but more like widgets to build the query itself. I wonder if the best way is not to make a view from the solr search and have filters instead of facets. Have an opinion on this ?

For indexing and searching, I intend to use spatial solr but if I thunks I will try to index coordinates as floats in a first time.

drunken monkey’s picture

Status: Active » Fixed

OK, yes, those really aren't facets but filters, and as far as I know you should be able to define them with Views. Just extend my filter handlers and add the appropriate behaviour. How difficult this will be UI-wise I don't really know, though, and also doesn't really concern the Search API. I'd think the Calendar should be rather easy to do. The map might take some more time, though.

I hope, I answered your questions with that and can set the status to "fixed"?
Otherwise please reset the status and keep asking. ;)

supportPIC’s picture

Yes, thanks for your answer. Concernig the how to in fact any field can be indexed if you define the entity prperties as described here http://drupal.org/node/1021466 or like for in the date_field_info and date_entity_metadata_property_info_alter functions in the date module .

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

luksak’s picture

Category: bug » support
Status: Closed (fixed) » Active

I have a phone field in a content type that does not appear in the fields settings of the index. Am I doing something wrong?

drunken monkey’s picture

No, the module providing the phone field is. Try with the latest dev, or otherwise open an issue in that module's issue queue.

luksak’s picture

I created a issue for this: #1300210: Phone fields do not appear on the Search API index field settings page

Can you tell me what might be wrong in the module so that I can try to fix it myself?

drunken monkey’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rooby’s picture

Status: Closed (fixed) » Active

I don't think the original question has been answered.

Lukas von Blarer:

I have a phone field in a content type that does not appear in the fields settings of the index. Am I doing something wrong?

drunken monkey:

No, the module providing the phone field is. Try with the latest dev, or otherwise open an issue in that module's issue queue.

The main question as I see it is:

How does the module providing the field make it's field available for indexing.
What hooks does the module have to implement, what functions does it have to call, etc.

This is something that really needs to be clearly documented so other modules can work in harmony with search API.

There are a bunch of field modules which I want to make patches for to allow them to be indexed I just need to know exactly what needs to be done.

rooby’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.