This is a meta-issue for collecting the main tasks needed for implementing a working version of the Search API. Everyone familiar with the Search API, especially (but not only) development-wise, is encouraged to chime in, discuss the changes we should make and also propose others.
The upgrade can be divided into two categories: necessary changes, and optional changes. While the former are absolutely necessary to make the Search API compatible with D8, the latter are nice-to-have code changes which we might want to make now that we have the change to easily re-define our API.
Necessary changes
- #2044071: Implement PSR-0 standard and proper use of namespaces
- #2044077: Make processors, datasources, service classes into proper plugins
- #2044087: Adapt indexes and servers to new core Entity API
- #2044093: Adapt menu entries to new Routing system
- #2044101: Change forms to use the new FormInterface
- #2044119: Minor D8 changes
- #2044139: Write D7->D8 migration code
- #2225331: [meta] Cover everything with unit tests
For the optional changes, see the child issues.
Especially people familiar with Drupal 8 and its changes are needed, but in general all developers (even new to D8) are more to welcome to help, there are tasks for all knowledge levels!
Regarding the inevitable question of whether the API/architecture changes will be backported to a new 7.x-2.x branch: I don't know. While having these advantages available in D7, too, would of course be a good thing, dealing with different, incompatible module branches and APIs is just a big pain for all extension modules. Probably most or all of them would have to create their own 2.x branch to stay compatible.
Also, kind of a killer argument, at the moment I have to be glad if I've even got enough time to complete the D8 upgrade in time. There's little chance I'll be able to simultaneously backport all API changes to D7.
So, let's see about that once the D8 version is working and in more or less good shape.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | variable_update.patch | 10.33 KB | drunken monkey |
Comments
Comment #1
klausiProper unit tests with PHPunit and/or DrupalUnitTestBase please.
Comment #2
drunken monkeyCompletely forgot to create an issue for it, but I just updated the variables to use the new systems.
Patch attached, if someone wants to review, but the changes are already committed.
(In case it's not obvious: I'm picking out the small easy tasks for now, since I'm much too scared of the Plugin API to tackle the major ones.)
Comment #3
drunken monkeyAnyone more familiar with D8, please see if you can help me with the question in #2044133-1: Support replacing the query class.
Comment #3.0
drunken monkeyAdded note about 7.x-2.x branch.
Comment #3.1
drunken monkeyAdded a list of name changes.
Comment #4
drunken monkeyTo make it easier for other developers to keep track (if they want to help, or just update their own, dependent modules), I have added a list of all relevant class and interface name changes to the issue summary. I'll try to keep it up to date.
So, e.g., if you come across a reference to
SearchApiQueryInterfacein the code, you should change that toDrupal\search_api\Plugin\search_api\QueryInterface(that is, change it toQueryInterfaceand adduse Drupal\search_api\Plugin\search_api\QueryInterface;at the top).Comment #5
aspilicious commentedCore has changed the place were entities are stored, you should change your code accordingly. So in stead of Plugin/Core/Index it should be Index
Comment #6
drunken monkeyThanks for the note, good to know!
Comment #6.0
drunken monkeyRemoved superfluous "class" and "interface" strings.
Comment #7
drunken monkeyAdded #2080791: Make data types into plugins and #2080799: Remove hook_search_api_item_type_info() as suggestions.
Comment #7.0
drunken monkeyAdded two related issues.
Comment #8
freblasty commentedThe usage of
entity_load()needs some attention. Is there an existing issue for this? Some parts still use the Drupal 7 way of loading entities. As a result #2044093: Adapt menu entries to new Routing system results into WSOD unless fixed. I have a patch ready just need an issue :).Comment #9
ianthomas_uk@freblasty Sounds like it could be #2044087: Adapt indexes and servers to new core Entity API
Comment #10
drunken monkey#2044119: Minor D8 changes might have been more appropriate, since it's largely just a change in arguments, but it doesn't really matter. Right now, things are pretty chaotic anyways, and I find getting things to work more important than documenting the changes correctly in the issue queue.
Also, right now I wouldn't be concerned about causing a WSoD, especially if it's just when viewing a certain page (and not for Drupal completely). If we can avoid it, great, but as long as we're moving in the right direction, it's not really an issue for me. After all, the module is useless at the moment anyways, so what does it matter if it gets a little more useless?
Comment #11
freblasty commentedI agree, but it's difficult to test #2044093: Adapt menu entries to new Routing system if the converted pages result in a WSoD :-)
Comment #12
drunken monkeyFair point, of course.
Comment #12.0
drunken monkeyChanged the new namespaces for the index and server entities.
Comment #13
drunken monkeyRelevant for all our plugins, entities, etc.: Annotation based plugins don't need a use statement anymore.
Comment #13.0
drunken monkeyAdded the »Add a flexible way for marking fields as "required"/"locked"« issue to the list.
Comment #14
drunken monkeyAdded #2126979: Overhaul the "Multi-Index Searches" module.
Comment #15
drunken monkeyAdded the optional tasks #2134799: Allow backend plugins to provide more specific feedback/information and #2134803: Add a "processing level" setting to search queries.
Comment #16
drunken monkeyRemoved the "optional changes" list, just reference this issue as the parent issue for those.
Also, there are three new issues: #2138843: Add more view modes support, even for content that is not an Entity, #2138839: Reduce the amount of code that unnecessarily relies on Drupal structure and #2138837: Add more flexibility in how we show data in an index.
I'm pretty sure the latter two are pretty minor, though, if they exist at all. We should definitely make sure to support external data as well as possible, but I think the basic framework already exists in our D7 version.
Comment #17
giorgio79 commentedI found a strange bug with multi valued fields #2193723: Hierarchical multi value field - count is always 1. Now, that entity reference is in core, perhaps the module could handle these better :)
Comment #18
drunken monkeyUpdated the issue summary with a link to the sandbox.
Comment #19
drunken monkeyA quick reminder here that proper development on this will (re-)start next Monday, with the Dev Days Szeged sprint. So if you have some discussion or thoughts to add, now's the time to do that. If you want to help, either be there in Szeged or follow the issues here to keep up to date and see where you could help. Being in IRC would probably help, too, some of the sprint attendees are bound to be there (maybe even me).
Something I would especially like feedback for is #2126979-1: Overhaul the "Multi-Index Searches" module, where I propose to let indexes have several item types, making combined site searches finally as easy as they should be. It would be a huge change, so I'd like to be pretty confident that it's the right choice before commiting to it.
Comment #20
drunken monkeyI guess we could/should also discuss the current rule of not being able to sort on fulltext or multi-valued fields: #2223659: Allow sorts on multi-valued and fulltext fields.
Comment #21
m1r1k commentedComment #22
drunken monkeyAlso to mention it here: during Dev Days Szeged, we are coordinating the porting effort in the #drupal-search-api IRC channel on Freenode.
Comment #23
Anonymous (not verified) commentedHi guys. I need the elasticsearch module for D8. How's Search API services looking? When can I start to work on service provider(or help guys that made elasticearch for D7) ?
Comment #24
drunken monkeyWe are currently hard at work in the sandbox (and its issue queue). You are more than welcome to give it a spin and maybe help out with the port. It's already improved a lot, but still not really usable. Also, I still expect a lot of API changes, so if you would start a port now, you would surely have to update it frequently until Search API 8.x becomes stable.
That being said, mollux is already working on porting the DB backend, so it surely can be done already. For now, there are only minor changes in the API, especially regarding service classes.
However, especially regarding Elastic Search, there might be a GSoC project doing this already, starting at the end of May (so very probably finished before Drupal 8 itself approaches release status.
Comment #25
drunken monkeyRemoved the list of class renames, since it was so outdated it was more confusing than helpful.
Comment #26
drunken monkeyUpdated issue text to reflect the current status (no more sandbox).
Comment #27
drunken monkeyA quick overview of our current status:
If you have any questions, a good place to ask them (except for the issue queue, of course) is the #drupal-search-api IRC channel.
Comment #28
MickL commentedYour last post is 7 month ago, but the last update was 10 days ago, so whats the current status? :)
Comment #29
drunken monkeyMore or less the same. ;)
The framework is basically working, but there are still a lot of architectural changes planned before we can release a stable version. Also, there hasn't really been any progress on the Views integration or any of the extension modules (except Solr and Attachments).
There are "Novice" issues (mostly just those that need to be ported from D7) for anyone who wants to help, as well as a lot of other issues for more experienced people (as said, bug reports will usually be easier to work on, and even help reproducing them or checking back with the creator would help).
Also, I'd be more than glad to help anyone who wants to help get started. Likewise, if you have a patch ready and I'm slow to look at it, please just ping me – in both cases, the #drupal-search-api IRC channel is probably the best place to do so (or use the contact form).
I'll be on vacation most of the time until Barcelona, so don't expect much progress until then, but there will be a week-long sprint again there (see and sign up here) so we'll probably get a lot closer to a stable version then.
Comment #30
andypostWhat is the current state and where help mostly needed?
Comment #31
borisson_We have identified a bunch of issues as beta blockers, those are the ones we need to close/give up or fix before we can release a beta, see https://www.drupal.org/project/issues/search/search_api?project_issue_fo...
Comment #32
drunken monkeyWe're down to the last few beta blockers and I think we can close this issue now.
I'm currently in the process of identifying the release targets and blockers.
If you've got any issues still pending which you think would be good to get into the first RC, please bump them to bring them to my attention (in case I missed them).
Comment #33
sachbearbeiter commentedComment #34
drunken monkeyActually, I'd like to use this opportunity to point everyone willing to help to #2784849: Tests fail w/ out of memory error., where we could really use some help. It's a problem that lets tests fail consistently on PHP 5 test bots, but no-one has yet been able to reproduce it locally. Would be great if someone could finally manage that, or otherwise shed some light on the issue.
@ sachbearbeiter: We're in the Search API issue queue, no need to prefix the title.