[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-search-dev] Search plugin and A LOT of hits
|
Hi,
I've implemented my own search page which searches through my internal
model. The search works mostly as it should, but I run into problems when
the search matches a lot of elements in my model.
I.e. searching for "*" which matches everything, I get about 45000
matches. The search itself only takes a few seconds, but the search
plug-in seems to take quite a while when updating itself. But this is
still acceptable.
The real problem is that when I run the same "*" search again, the actual
search is again pretty quick, but then the SearchManager spends A LOT of
time (~10 - 15mins) in SearchManager.addNewSearch().
More specifically:
SearchPlugin.getWorkspace().getRoot().deleteMarkers(SearchUI.SEARCH_MARKER, true, IResource.DEPTH_INFINITE);
As far as I can tell, the problem is the code which clears the MarkerSet
off the markers from the previous search. It looks like a lot of time is
being spent in MarkerSet.removeAll(IMarkerSetElement[]). Also, the sorting
of the matches takes a while, but I guess this cannot be helped...
Is this justthe way things are, or am I missing something in my
implementation? Has anyone else run into similar problems with the search?
Are there any common strategies in handling "*" searches which produce too
many matches?
--
Lauri