Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334713 - [search] Case-insensitive filename search
Summary: [search] Case-insensitive filename search
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Server (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.5 M2   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 370051 (view as bug list)
Depends on:
Blocks: 361449 370051
  Show dependency tree
 
Reported: 2011-01-18 16:18 EST by John Arthorne CLA
Modified: 2012-04-20 16:28 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2011-01-18 16:18:57 EST
(Steps assume you are self-hosting and have the webide source code indexed in your workspace)

1. Pop up the "Open resource" dialog.
2. Search for "openresource". I expected 2 results, but get 0.
3. Change the query to "OpenResource". Now you'll see the results:
- OpenResourceDialog.js
- OpenResultsDialog.html

In general we should perform a case-insensitive search, possibly changing to to case-sensitive if the user enters a mixed-case search term. (This is the approach currently taken by the Find feature in the editor)
Comment 1 John Arthorne CLA 2011-01-18 16:19:36 EST
John Arthorne Dec 10, 2010 3:21 P.M.
I did some initial investigation and this is surprisingly complicated in lucene/solr. Essentially we can do "always lowercase" or "always case-sensitive" search quite easily. But, this decision is made at indexing time rather than at query time, so it can't change on the fly. Apparently the typical strategy is:

- Index contains two copies of each record: fully lowercased, and original case
- The query selects whether they are searching the lower-cased or original-case field:

q=Name:OpenResoruce*
q=LowerName:openresource*
Comment 2 John Arthorne CLA 2012-02-01 08:54:12 EST
*** Bug 370051 has been marked as a duplicate of this bug. ***
Comment 4 Silenio Quarti CLA 2012-04-20 15:44:34 EDT
In the latest orion.eclipse.org, if I Ctrl+Shift+F in the Navigator and type "textView", I get no results. "textview" shows results. I expected to see textView.js in both cases.
Comment 5 John Arthorne CLA 2012-04-20 16:14:43 EDT
(In reply to comment #4)
> In the latest orion.eclipse.org, if I Ctrl+Shift+F in the Navigator and type
> "textView", I get no results. "textview" shows results. I expected to see
> textView.js in both cases.

Yes just looking at that now. Looks like a bug in solr: https://issues.apache.org/jira/browse/SOLR-219

I will put in a workaround for this.
Comment 6 John Arthorne CLA 2012-04-20 16:28:20 EDT
(In reply to comment #5)
> Yes just looking at that now. Looks like a bug in solr:
> https://issues.apache.org/jira/browse/SOLR-219
> 
> I will put in a workaround for this.

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=612abc1354927be2c6d769073e31b077ba94a12f