Problem/Motivation

XMLSitemap contains a lot of code to build an index of the website. https://drupal.org/project/xmlsitemap
It's not similar to backends SearchAPI usually talks to. We don't talk to incrementally to a service, instead, we need to write the xmlsitemap file as a whole. This, however, could be added as a separate process.

It would need to maintain its settings, such as relevance (similar to boost?!)

Search, is nothing it would take care of. We never want to query an XMLSitemap, except you're crazy. ;-)

This ide came up while reviewing ongoing GSoC work: https://groups.drupal.org/node/424288

Proposed resolution

Write a backend to replace the whole indexing processof XMLSitemap.
Let xmlsitemap define extra settings in Search API.

Find a way to efficiently write the XMLSitemap format. Allow to write the file incrementally. Building something like a balanced binary tree of prebuilt fragments would be an approach. If an item is updated, only parts of the tree are updated. Updating the whole file is as much as rebuilding that chunk after import and merging the chunks. A stable order is important. This could be implemented pretty fast!

Current GSoC sandbox (not considering this approach yet): https://drupal.org/sandbox/andreimariusdincu/2222965

Remaining tasks

Discuss about this idea. For now it's just an idea how to limit duplicated work and discuss about benefits of working together.

User interface changes

API changes

Comments

drunken monkey’s picture

Title: Generating xmlsitemap? » Implement as a Search API backend?
Project: Search API » XML sitemap
Version: 8.x-1.x-dev » 7.x-2.x-dev
Component: Framework » xmlsitemap.module
Category: Feature request » Task

An interesting idea.
However, since it wouldn't be implemented in the Search API module, it doesn't really belong into this issue queue, I think.
I'm not familiar with the XML Sitemap module, so I don't know how much overlap there'd be, and whether avoiding the code duplication would be worth the additional effort of integrating with another module (which was also built for a different, though related, task). I could imagine this working great, though, and it should certainly be possible.

In the end, it's just a question of whether someone wants to work on it (or pay someone to do that).
If someone does, though, I'd be happy to give advise regarding the Search API side of things.

(The XML Sitemap project doesn't have a 8.x branch currently, and the sandbox is probably not the best place for this issue either, so just posting it as 7.x for now. Also, I think implementing this in 7.x would also be possible.)

It would need to maintain its settings, such as relevance (similar to boost?!)

Such settings could just be put on the server, right?

miro_dietiker’s picture

Status: Active » Postponed

@drunkenmonkey, thank you for your opinion!
It was decided by the mentors that the GSoC project continues as a straight XMLSitemap port first.

The idea will be reconsidered for a future 8.x-2.x branch. Related work in 7.x area is very unlikely to happen now that the port is already well progressed.