Page MenuHomePhabricator

Allow getting additional fields from cirrussearch API
Closed, ResolvedPublicFeature


Feature summary I've added fields to my elastic search index, by SearchIndexFields hook. Now I want to get then in the response. Not to filter by them, but to get the values of fields for each result.

For example, I've added all the editors of MW page to an authors field. Now I want to get the value in the search.

Use case(s) For now, as far as I know, there is no proper way to grab more fields, other than props described in search api. I want to get my new, additional fields, the only way I've managed to do it is by creating my own new APIListModule, inherit ApiQuerySearch and override it's getSearchProfileParams method.

Benefits By adding simple way to add those extra fields, we can use regular search API endpoint with additional fields.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 809293 had a related patch set uploaded (by Anysite; author: Anysite):

[mediawiki/extensions/CirrusSearch@master] Search results: add extra fields conf

That's my take how to implement this. Of course, if there is already a built in way to do it I would be happy to learn.

Aklapper renamed this task from How can I get additional fields from cirrussearch API? to Allow getting additional fields from cirrussearch API.Jun 29 2022, 10:30 AM

Change 809293 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] Search results: add extra fields conf

dcausse added a subscriber: dcausse.

@Anysite I'm tentatively closing this ticket because your patch was merged, but please reopen if there's still something left to do.

Aklapper reassigned this task from dcausse to Anysite.

actually closing