I'm working on a project to use the migrate module to import data in a general fashion from one Drupal site to another. I'm looking at using Services 3 and rest_server to deliver the content from the source site. Naturally, the destination side (migrate module) needs to discover what content is available - i.e., it needs index actions on any data type to be migrated. Nodes and users are all set, but we also need indexing on taxonomy terms, comments, and files. I will see if I can provide a patch or patches (my first time with the Services API, please be gentle!).
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 0001-Index-resource-Fixes.patch | 30.85 KB | kylebrowning |
| #13 | 0001-Index-resource-Fixes.patch | 26.95 KB | kylebrowning |
| #10 | 1063460-add-indexes.patch | 17.02 KB | marcingy |
| #9 | 1063460-add-indexes.patch | 17.02 KB | marcingy |
| #8 | 1063460-add-indexes.patch | 17.02 KB | marcingy |
Comments
Comment #1
mikeryanEasier than I thought! Here's a patch adding index support to vocabularies, terms, comments and files.
Comment #2
marcingy commentedMoving to 7.3 as we implement there and then backport. As there is a patch leaving at for review rather than marking as postponed.
Comment #3
kylebrowning commentedThis also needs to be done with git format-patch instead of cvs diff :P
Comment #4
marcingy commentedGrabbing as I'll work on this over the next couple of days
Comment #5
marcingy commentedInitial patch - lacking tests but I'm intrested on comments about the vocabulary index approach s I'm not sure if this is the right way to go or not.
Comment #6
ygerasimov commentedRegarding taxonomy vocabulary index. I would even kept all information about fields not only about bundles. So to make it like
But I don't know whether we really need that information in index method as it is quite specific. Maybe it is more reasonable to have it in retrieve.
Another point is not to use default values in callback arguments. So instead of
should use
What I am thinking also is to use EntityFieldQuery to select objects as nearly everything now are entities. This will help to unify functions a lot.
And of course we need tests. Also please check formattings as some trailing spaces were introduced and tabs instead of spaces used.
Comment #7
marcingy commentedNew patch tidying up the issues above, and simplifying the vocab index as per irc. This patch also unifies the index building code. Still need to work on tests. Marking as needs review given the amends in this patch to how we build indes lists and queries.
Comment #8
marcingy commentedTypo
Comment #9
marcingy commentedHopefully this time this is good.
Comment #10
marcingy commentedWrong patch above.
Comment #11
kylebrowning commentedThis gets my vote, everything looks good to me. WE just need to write some tests for it.
Comment #12
ygerasimov commentedtypo here
I believe comments can't be sticky.
I really like idea with functions services_resource_build_index_list() and services_resource_build_index_query().
Is it reasonable to add tags to queries. For example add tag "node_access" to node index query and "comment_filter" to comment query.
And surely we need tests for these methods.
Comment #13
kylebrowning commentedupdated patch, includes tests. still missing files tests, but i got al the other tests working.
Comment #14
kylebrowning commentedok ive added all the tests, everything passes, heres updated patch, marking this as to be ported,
Comment #15
marcingy commentedComment #16
marcingy commentedThe patch committed has one issue in terms of style
should be
Comment #17
kylebrowning commentedFixed
Comment #18
marcingy commentedThe patch originally supplied should be good for 6.x.3.x of course this lacks the helper functions that were introduced in the 7 branch but functionally it looks good from reading assuming tests pass.
Comment #19
kylebrowning commented