Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357857

Summary: [Help][Search] "Search selected topic and subtopics" sometimes shows "Nothing found" by mistake
Product: [Eclipse Project] Platform Reporter: Holger Voormann <eclipse>
Component: User AssistanceAssignee: platform-ua-inbox <platform-ua-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: cgold
Version: 3.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug
Attachments:
Description Flags
Maximum hits increased from 1000 to 100000 none

Description Holger Voormann CLA 2011-09-15 14:40:26 EDT
Steps to reproduce (with N20110910-2000 or later):
1. Open Help: "Help > Help Contents"
2. In TOC select: "Java development user guide > What's new"
3. Click: "Search selected topic"
4. Enter search expression "eclipse" (without quotes) and click "OK"

-> "Nothing found."

Should: At least the selected topic which in the first paragraph contains "...release of Eclipse." should be found.


Alternative steps to reproduce:

(A) Set a scope that contains "Java development user guide > What's new" only and search for "eclipse" (without quotes).

(B) At http://help.eclipse.org select "Java development user guide > What's new" (<http://help.eclipse.org/indigo/topic/org.eclipse.jdt.doc.user/whatsNew/jdt_whatsnew.html>) and search selected topic for "eclipse". Also related to bug 352434 <https://bugs.eclipse.org/352434> which is fixed in CVS but not at help.eclipse.org.
Comment 1 Chris Goldthorpe CLA 2011-09-15 14:52:02 EDT
I see the problem also using I20110914-0200. If I search for other words in the same document they are found. My guess is that Eclipse searches all documents and only looks at the top 500 matches, then determines whether any of those 500 documents is in the selected page. In any case this is a bug and should be fixed.
Comment 2 Holger Voormann CLA 2011-09-15 14:59:02 EDT
Created attachment 203437 [details]
Maximum hits increased from 1000 to 100000

Problem: In the first step the whole documentation is queried and then the "selected topic and all subtopics" are filtered out from search results. Unfortunately, the first step produces maximum 1000 hits and in some cases the hits of the selected topic and subtopics are beyond hit number 1000.

Fix/workaround: increase maximum hits from 1000 to 100000 (see attached patch). Maximum hits must be greater or equal than the total number of indexed topics (to avoid that in some cases everything is filtered out by a post processed scope or "Selected topic (and subtopics)" filter).

Real fix: instead of applying ISearchHitCollector after the search has be done the search engine should be called with an org.apache.lucene.search.Filter.
Comment 3 Chris Goldthorpe CLA 2011-09-22 19:45:07 EDT
I think the real fix would be preferable, in any case I will hold off on fixing it until after the upgrade to the latest Lucene version scheduled for Juno.
Comment 4 Chris Goldthorpe CLA 2011-10-18 17:08:19 EDT
Removing target milestone as this is not currently in the schedule.
Comment 5 Lars Vogel CLA 2019-11-14 03:52:16 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.