What is the best way to search multiple sources at once?

I am writing a phone book search that will request several remote sources, but I am wondering what is the best way to approach this task.

The easiest way to do this is to take the query, start the thread for the remote source query (limiting the maximum results to say 10), expecting the results from all threads and aggregating the list with a total of 10 records and returning them.

BUT ... which of the remote sources is more important if all sources return at least 10 results, so I would have to do a search on the search results. Although this will provide accurate information, it seems that it is inefficient and is not likely to scale well.

Is there a commercial open source solution that I could use and extend, or is there a smart algorithm I can use that I skipped?

thanks

+3
source share
2 answers

John, I believe you want a federated search . I suggest you check out Solr as the basis for this. I agree with Nick that you will have to independently evaluate the relative quality of various sources and build a merge function. Solr has some infrastructure for this, as this message flow shows .

+2
source

, , : , :-)

, , , : - -, ajax - , GUI .

, , , . , " ". , 10 10 . - > 0. "" . "" . , . , . , , . - , , , 10, .

, 10, , , 10, , , . , , . , , 10 - , .

- f00l. , , - , . Kayak.com - , - .

, .

0

Source: https://habr.com/ru/post/1723302/


All Articles