First of all... Great module... Great work!!
I have got the following issue.
If you create an index for nodes you can add related fields like author, ...
I want to search on USERS and:
- want to get them as a result in a view (database search server)
- but create one exposed filter on an user textfield or the body of the user generated content (concreet: showing exhibitors(user role) - searching based on the content of the exhibitor(user) and the news(content) and innovation(content) articles that they've created)
Therefor i need related fields for a user that link to the created content of that user (f.e. field: node_body)
------
I also use the module User Points...
As I want to sort the users on there 'activity' on our site, the user points field would be ideal. Any Idea how i can access that?
Thanks a lot for your feedback!
Glenn
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1710212-6--user_content_callback.patch | 3.14 KB | drunken monkey |
Comments
Comment #1
glenn_jones commentedComment #1.0
glenn_jones commentedupdate
Comment #2
lennart.maschmeyer commentedhave you found a solution? also trying to sort results based on user points, am guessing there is some kind of plugin needed, but I am not a coder so I wouldnt know how. Appreciate any input :)
Comment #3
nick_vhI cannot really see the feature request here, looks more like a support request. Unfortunately I'd have no idea how to do that but it might need some custom coding.
If this is a feature request,please bump it up to D8 and write clearly what you would want, what you expect and perhaps some screenshot with a mock-up how it should work.
Comment #4
drunken monkeySorry for not answering in this issue initially!
For indexing user points, the User Points module would have to integrate their field with the Entity API. Then, it should show up correctly in the index's Fields form.
Indexing all content authored by the user would need some custom code. Easiest would be to use
hook_entity_property_info_alter()to add a new field of typelist<node>to the user and returning an array of all the user's node NIDs in the getter callback. You could then just index any fields from the node and/or use the "Aggregated fields" data alteration to combine them into a single one.Comment #5
feldmarv commentedWhat is the current status here? Did someone implement such an use-case with custom coding?
Comment #6
drunken monkeyThis patch would add a data alteration providing this functionality.
I'm not completely sure whether it's generally useful enough to add it to the module, though. Even though I included a warning in the plugin description, this might lead to performance problems, or even out-of-memory errors, when used on larger sites. Seems to me this would be the biggest problem here.
But if someone has a user index on their site (which isn't that common anyways, I think), it seems reasonable that they would expect to be able to index the users' authored content, too.
Anyways, please test/review!
Comment #8
drunken monkeySeems to work well enough. Committed.
Comment #9
feldmarv commentedA great thanks to @drunken-monkey. The implementation is working really nice!