I am looking for a way to integrate statuses with Apache Solr to be able to search for statuses.

I found some post's in D6 issue queue but the information wasn't very helpful.

Has someone done anything similar?

Thanks,
Francisco

Comments

IceCreamYou’s picture

Status: Active » Postponed (maintainer needs more info)

I think that the Apache Solr module is designed to search for entities. Once we make Statuses entities, it should be able to search them using Apache Solr views.

I could be wrong about this though -- I don't know much about Solr.

chicodasilva’s picture

For what I've searched (Search API) there is also the possibility to consider statuses a non-entity and implement the class for a new non-entity datasource.

However, the documentation for implementing this use case, is not much.

nadav’s picture

Subscribing

chicodasilva’s picture

After some research this can be done with Search API.

There are 2 important steps:

Implementing your own class of:

class StatusesDataSourceController extends SearchApiExternalDataSourceController {}

In hook_statuses_save() index the status:

  // Update search Index
  if (module_exists('search_api')){
    if ($edit){
      search_api_track_item_change('statuses', array($status->sid));
    }else{
      search_api_track_item_insert('statuses', array($status->sid));
    }
  }
IceCreamYou’s picture

Status: Postponed (maintainer needs more info) » Active

Patches welcome :)

Fayna’s picture

I would love to see a patch of this also!!

chicodasilva’s picture

Available a first draft version at https://github.com/chicodasilva/statuses_solr

IceCreamYou’s picture

Issue summary: View changes
Status: Active » Fixed

Thank you, chicodasilva. I added your link to the module's project page under "useful modules."

Status: Fixed » Closed (fixed)

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