Ticket #954 (new Enhancement)

Opened 4 years ago

Last modified 4 years ago

dm4-core: Extend the searchTopics API to allow for many typeUris and a returnTypeUri

Reported by: Malte Owned by:
Priority: Minor Milestone: Release 4.8
Component: DeepaMehta Standard Distribution Version: 4.7
Keywords: Cc: jri, JuergeN
Complexity: 5 Area: Application Framework / API
Module: deepamehta-core

Description

Current state of the searchTopics API is:

dm4.searchTopics(String typeUri, String query);

On extension that would be very handy is:

dm4.searchTopics(List<String> typeUris, resultTypeUri, queryString);

While the latter, extended searchTopic call would do the following:

  • search for "queryString" in topics of all the given "typeUris"
  • while returning just topics of type "resultTypeUri" in the results (while in my case the resultTypeUri is alwaysy an immediate "parent" of the searched "typeUris", sometimes aggregating and sometimes composing typeUris)
  • and returning a result just which contains any search result (of type returnTypeUri) just once

This extension would free the plugin developer of:

  • firing many different searchTopics-call for many typeUris
  • and make the resultsets unique afterwards

That would be neat, i think.

Change History

comment:1 Changed 4 years ago by Malte

A second extension about which i recently thought about is the following one:
To enable a much more performant combination of fulltext search queries with other API queries the searchTopics-method should be able to take in a list of topic (or association Ids) which, if given, provide the "scope of topics" the search results are made of.

This would be kind of a work around not being able to combine these queries into a single one. So, the idea is that any kind of query, may it be relatedTopics, timerange or geospatial query returns topic ids and the result of such a query needs to be combined with a fulltext search.

Example given:

dm4.searchTopics(String typeUri, String queryString);

Envisioned:

dm4.searchTopics(String typeUri, String queryString, List<long> dmObjectIds);

This additonal filter should be, at best, available on all future extensions of the searchTopics API.

Note: See TracTickets for help on using tickets.