Search custom variables in SphinxSearch?
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?
0
Comments
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 aroletable is linked to theusertable via an ID of some sort, then another inner join should also be added to thesql_queryin thesphinx.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 themainsearchwidgetThanks.