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

Bug 339502

Summary: [search] Combined search for file names and contents
Product: [ECD] Orion Reporter: Szymon Brandys <Szymon.Brandys>
Component: ServerAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse, jarthana, john.arthorne, susan
Version: 0.2   
Target Milestone: 8.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description Szymon Brandys CLA 2011-03-10 07:36:48 EST
Steps:
1) Create a folder and 'a.txt' file inside
2) Enter 'a' in the search field and Enter, Search Results will show 'a.txt'
3) Now enter 'a.txt' in the search field and Enter, noting is found
Comment 1 Susan McCourt CLA 2011-03-10 10:32:50 EST
We currently use "open resource" to do file name based search, and the search box for content search.  These need to be collapsed some how.  Some sites have buttons next to the field such as [search] and [search names].

See also bug 334044
Comment 2 John Arthorne CLA 2011-03-10 11:18:35 EST
That search field searches only file contents. It is interesting that it found "a" at all in this case.

But I agree combining them makes sense. What I have seen elsewhere is that both file names and bodies are searched, but filename hits are ranked much higher than file content hits. This could all be implemented in the Lucene algorithm so Susan let me know if this sounds reasonable to you.
Comment 3 John Arthorne CLA 2011-03-10 11:19:28 EST
Adding to my list for M7, but Susan I'm hoping you can set the direction on what the UI looks like.
Comment 4 Susan McCourt CLA 2011-03-10 11:24:31 EST
I like the idea of searching file names too and having them at the bottom.  (So that a.txt would likely be the only hit and it would appear to "just work")

I still think that developers will want access to a file name only search, but I can think about the UI for that in bug 334044.
Comment 5 John Arthorne CLA 2011-04-08 16:24:50 EDT
This isn't on the plan for M7.
Comment 6 Jay Arthanareeswaran CLA 2012-04-02 07:05:11 EDT
Created attachment 213441 [details]
Proposed fix

Searching on the index fields, such as name of the file, is already supported by Orion search feature. There is a minor bug that needs to be fixed, though, to make it work for file names.

Attached is a simple fix for the specific case reported here. With the patch, searching for the following term would produce all files named index.html.

Name:index.html

Please note that the file name should match exactly. For some reason, we concatenate multiple terms from the client side. Otherwise, even something like "Name:index.html planetorion" works like a charm.
Comment 7 Anthony Hunter CLA 2015-01-19 15:10:51 EST
(In reply to Szymon Brandys from comment #0)
> Steps:
> 1) Create a folder and 'a.txt' file inside
> 2) Enter 'a' in the search field and Enter, Search Results will show 'a.txt'
> 3) Now enter 'a.txt' in the search field and Enter, noting is found

This problem does not occur anymore.