Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search custom variables in SphinxSearch?
This discussion is related to the SphinxSearch addon.
Hi. Is it possible to modify SphinxSearch so as to search for a new variable? I'd like to search by Role.
I'm not a coder but was wondering if the php files could be easily modified... maybe replacing the "tag" search function with "roles?" I found about 100 cases of "tag" in the plugin php files. Can I just find/replace them?
I doubt it's that easy, but maybe it can be done?
It is certainly doable. From a high level of things, what needs to happen is that an attribute needs to be saved like
sql_attr_uint = UserRoleId. Assuming that a
roletable is linked to the
usertable via an ID of some sort, then another inner join should also be added to the
sphinx.conffile. Now sphinx can intelligently gather the needed information to filter.
The plugin can then issue a filter against the query to filter the results by the
UserRoleId. The returned results can then be displayed like normal. You can add a widget class in the widgets folder to do this, or manually edit the