Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

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?

Comments

  • mcu_hqmcu_hq yippie ki-yay Arizona, USA ✭✭✭

    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 role table is linked to the user table via an ID of some sort, then another inner join should also be added to the sql_query in the sphinx.conf file. 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 mainsearch widget

    hgtonight
  • Thanks.

Sign In or Register to comment.