feat: FullTextSearch request includes portion of data to be retrieved from indexer - #62903
Open
madbob wants to merge 1 commit into
Open
feat: FullTextSearch request includes portion of data to be retrieved from indexer#62903madbob wants to merge 1 commit into
madbob wants to merge 1 commit into
Conversation
madbob
requested review from
Altahrim,
leftybournes,
nfebe and
salmart-dev
and removed request for
a team
August 4, 2026 16:54
CarlSchwan
approved these changes
Aug 4, 2026
CarlSchwan
reviewed
Aug 4, 2026
… from indexer Signed-off-by: Roberto Guido <info@madbob.org>
CarlSchwan
reviewed
Aug 5, 2026
| * @since 35.0.0 | ||
| */ | ||
| enum BodyPortion: string { | ||
| case TITLE = 'title'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up nextcloud/fulltextsearch#960
Right now, FTS platform
fulltextsearch_elasticsearchreturns an arbitrary set of data among those stored in the index, ignoring tags, subtags, metatags and more (pun intended).It is fine to no fetch and pass everything all the time, but sometime a provider may find convenient to just reuse data already attached to a document instead of retrieve all of them from scratch.
Use case: I'm hacking a FTS provider for mail, and I have lots of structured data to index, to filter in search requests (e.g.
from:filters), and to use while displaying the response (e.g.fromcan be used to retrieve the avatar of the message sender). Retrieve all of them again from the database (or, even worse: from the IMAP server) for each search result may become a bit inefficient.Rationale of this proposal is to provide a method for the provider to specify (eventually in own implementation of
IFullTextSearchProvider::improveSearchRequest()) the list of parts required back from the platform. A mere list of strings inSearchRequest, meant to be read and handled from the platform.Sample implied implementation of changes in
SearchMappingService::generateSearchQueryParams()(here):and
SearchService::parseSearchEntry()also would require some adjustment (which I can provide myself if this is approved!).