I've been toying with the idea of using search_api to power the SPARQL Endpoint module. The way it works now is that we build the RDF model for each entity and then index it into the SPARQL endpoint. There are already some overlap with search_api like update the index on entity update etc. But I don't want to keep reinventing the wheel and would rather search_api. I would like to use search_api to keep track of what needs to be indexed, and let the admin decide what entities need to be indexed. Fago said that this might not work because search_api does not work on the full entity but only on each field. The SPARQL Endpoint has a different model in the sense that we build the RDF model and index it all. The way the admin decides if a field is to be indexed is done through the RDF mapping UI, because we use that also to output the RDF for each node (e.g. node/1.rdf). We also let other modules alter the RDF model, add more resources and possibly for "fields" which might not normally be present in the regular Drupal field UI (and therefore unknown to search_api).

Could search_api work for us and index a whole RDF model (I guess you could call it "document" in solr speak)? I know you can set for example the full entity in the search_api index UI, but I'd like to know how we could achieve something similar for RDF/SPARQL.

Search API features that will be used:
- service class
- indexing of the RDF data
- tracking of what needs to be indexed/re-indexed

Search API features that will not be used:
- field level indexing: that's already taken care of by the RDF modules
- expose searchable fields (e.g. for Views): the point is to use a different search interface via SPARQL. If Views integration is required, people can use SPARQL Views.

Comments

scor’s picture

Here is a summary of a chat I had with drunken monkey.

1. You need to implement a service class for the RDF store. There is a UI abstract class that you can extend. Override the index method to look up the entity and get its RDF, then send it to the server for indexing. don't forget the hook service info for that class.

2. implement the search method to say that search via search_api will not be available (it will be available separately via the RDF store's SPARQL Endpoint).

scor’s picture

Status: Active » Fixed

I've finally published rdf_indexer. thanks drunken monkey for your guidance!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

add features used and not used