Some random thoughts...  In case any of them are helpful...

If the URLs are unique you might be able to elevate them "as is" with a
boost or some other method...
If the titles are unique, you might be able to do the same (this might
require storing the EXACT title in another, non-indexed field)
If you stored the URL --> ID mapping in another data store (or a separate
collection) it might shorten the query time (although it won't eliminate
the step)

On Tue, Jan 31, 2017 at 12:04 PM, Shamik Bandopadhyay <sham...@gmail.com>
wrote:

> Hi,
>
>   I'm trying to integrate results from a third party source with our
> existing search. The idea is to include the top 5 results from this source
> as the top result of our search.Though the external data is indexed in our
> system, the use case dictates us to use their ranking (by getting the top
> five result). Problem is, their result returns only text, title, and url.
> To construct the final response, I need to include a bunch of metadata
> fields which is only available in our index. Here are the steps:
> 1. Query external source, get top five results.
> 2. Query our index based on url from each result, retrieve their
> corresponding id.
> 3. Query our index and pass the ids as elevateIds (dynamic query elevation)
>
> This probably isn't a clean solution as it adds the overhead of an
> additional query to retrieve document ids. Just wondering if there's a
> better way to handle this situation, perhaps a way to combine step 2 and 3
> in a single query or a different approach altogether?
>
> Any pointers will be appreciated.
>
> -Thanks,
> Shamik
>

Reply via email to