eclipse-instasearch icon indicating copy to clipboard operation
eclipse-instasearch copied to clipboard

exact phrase match is not at the top

Open michalre opened this issue 9 years ago • 3 comments

When I search for the phrase "lastname was" with or without quotes the file containing the match is found but is about hundredth in the result list preceded by files that contain only word lastname. This is an important issue for me because I have a big code base so almost always I need to search for more words otherwise I get hundreds of results. Am I doing something wrong?

michalre avatar Apr 19 '15 01:04 michalre

Hi, its hard to say what's going on without seeing your workspace or having a testcase. It could be that those words occur more often in other files. If you'd be able to add a unit test where this happens then it'd be easier to tell the reason: https://github.com/ajermakovics/eclipse-instasearch/blob/master/instasearch/test/it/unibz/instasearch/indexing/SearcherTest.java

ajermakovics avatar Apr 19 '15 09:04 ajermakovics

The thing is, most people and especially programmers want to find exactly what they write, for example "my_function" shouldn't find all files which include the word "my" - the "_" is not a whitespace which can be ignored! Similar "struct.member" and so on. Even Google learned that some time ago, that a space doesn't mean "OR", but "AND". If you think that there are people which have use for an "OR" type search, make this an option like the "similar matches". I hope this is fixed soon, because it makes the plugin unusable for many searches.

WeeGee77 avatar Dec 08 '16 17:12 WeeGee77

Hi,

is there any progress on this issue to be expected. I just found this plug-in and my first try did not work out as expected, because a search for "func_isr" was not exactly found. As explained by WeeGee77 above a underscore '_' seems to be treaten as a wildcard or a OR. The plug-in looks promising, but only when exact names are really found.

regards

spachner

spachner avatar Oct 21 '17 19:10 spachner