This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 450017 - [server] Provide a reliable "grep" style search
Summary: [server] Provide a reliable "grep" style search
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Server (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 8.0   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 455275 455276 457386
Blocks:
  Show dependency tree
 
Reported: 2014-11-04 16:52 EST by Anthony Hunter CLA
Modified: 2015-01-19 12:56 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Hunter CLA 2014-11-04 16:52:10 EST
As mentioned in Bug 440699 Comment 1 :

> Folks on the Orion team have been discussing alternatives. We would like to
> extend the filesystem API to allow filesystems to provide reliable "grep"
> and "find" style searches. These could be executed on the server, and hence
> offer much better performance than Orion's existing client-side crawl. We
> don't have a time frame for this work yet, but we all struggle with search
> on a daily basis so we understand the importance.

We need to create a prototype server side for a crawling grep like search and see how much fast / slower it is than Lucine/Solr.
Comment 1 Anthony Hunter CLA 2014-11-04 17:34:03 EST
I did a rebase of the aidanr/grep_search_work branch with master to bring in the latest changes.

I made a small compile error fix based on the latest changes with commit:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?h=aidanr/grep_search_work&id=50d2ae05e4c8e4c0051fbda9771203574a551301

I would like to be able to update the plugin.xml for the search bundle and swap SearchServlet with GrepServlet and run some tests with the Orion client. It does not seem to find any files though. Can we fix that?

For example, if we search for simple words in the orion client project it would be easy to judge the performance.
Comment 2 Anthony Hunter CLA 2014-11-26 17:04:03 EST
I have pushed Aidan's work from the branch to master. The feature is disabled by default and can be turned on by adding to orion.conf:
orion.search.grep.enabled=true

This is commit:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=7dac1da1980ead87cf1f5172c923b129b698c153

I made a few tweaks and the search panel now works with grep search.
- I had the add a temporary responseHeader in GrepServlet.convertListToJson()
- updated the file details in GrepResult.toJSON()
- added FileGrepper.handleDirectory() to filter the ".git" folder

Scope search looks to be working great for me in the orion client.

We just need to fix "find files", "case sensitive", and remove the crawling search when using "regular expression".

p.s. git merge from the branch would not work for me, so I added all the changes with a new commit.
Comment 3 Paul Webster CLA 2014-12-03 09:29:45 EST
(In reply to Anthony Hunter from comment #2)
> 
> This is commit:
> http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/
> ?id=7dac1da1980ead87cf1f5172c923b129b698c153

There are errors in this project:
Description	Resource	Path	Location	Type
The constructor IOException(CoreException) is undefined	FileGrepper.java	/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/grep	line 108	Java Problem
The method isEmpty() is undefined for the type String	SearchOptions.java	/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/grep	line 53	Java Problem

Both of these methods were added in Java 6, but the execution environment for that bundle is J2SE-1.5

PW
Comment 4 Paul Webster CLA 2014-12-08 10:08:25 EST
(In reply to Paul Webster from comment #3)
> 
> There are errors in this project:
> Description	Resource	Path	Location	Type
> The constructor IOException(CoreException) is undefined	FileGrepper.java
> /org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/
> search/grep	line 108	Java Problem
> The method isEmpty() is undefined for the type String	SearchOptions.java
> /org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/
> search/grep	line 53	Java Problem

This is still broken.

PW
Comment 5 Anthony Hunter CLA 2014-12-15 14:03:44 EST
I have pushed the latest set of changes with commit:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=48abb0615a1b3868122c3d0f14c56d6ebfa5a60c

The feature matches the search results that were provided by the Apache Lucene search. I have ran a build and deployed it to https://orion.eclipse.org.

We are using the same Orion client against a server with the feature turned on by the orion.conf setting:
orion.search.grep.enabled=true

p.s. this commit is not in this week's stable build until we have run a test pass on orion.eclipse.org.
Comment 6 Anthony Hunter CLA 2015-01-19 12:56:44 EST
The new "grep" style search is now the default in the Orion server.

I have removed the old SearchServlet and solr/lucene bundles from the target.

This is commit:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=b1452a9e22383fcbfd2d9e8b44050906e95110ed