За и против использования класса MultiSearcher Lucene

Вы можете выполнить следующую команду в менеджере пакетов

UnInstall-Package EntityFramework

Затем установить необходимый пакет, используя

Install-Package EntityFramework -Version 5.0.0
5
задан Steve Chapman 5 June 2009 в 20:45
поделиться

1 ответ

The main drawback to MultiSearcher is that there is some overhead in merging results from multiple searchers into a single set of hits. It's similar to the penalty you experience with an unoptimized index, although likely not as severe—it depends on how many searchers are involved.

However, MultiSearcher can be very useful if you have a lot of documents, or need to do frequent updates. If you have a huge database, it allows you to split your documents into groups to be indexed on separate machines in parallel, then searched together. If you need frequent updates, you might find a MultiSearcher that has one file-system directory and one RAM directory gives you fast index updates. New documents go into the RAM directory, and periodically the contents of the RAM directory are merged into the file-system directory.

Also consider ParallelMultiSearcher. Depending on your machine architecture and query load, this could hurt or help. If you have many cores, it is likely to help, but there is additional overhead involved with the threading, so it requires some profiling under representative loads.

4
ответ дан 15 December 2019 в 01:10
поделиться