oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.34k stars 745 forks source link

Multiple term search yielding a intersection result on line content (Bugzilla #173) #482

Open vladak opened 11 years ago

vladak commented 11 years ago

status ACCEPTED severity enhancement in component webapp for --- Reported in version unspecified on platform ANY/Generic Assigned to: Trond Norbye

On 2007-11-07 09:09:03 +0000, Jason Leonard wrote:

Currently a multi term search like "main argc" would result in an intersection of documents with these terms and a union of line content, but a user could be searching for only content lines with both these terms in. Therefore an intersection of documents and an intersection of line content.

e.g. +main +argc

main.c 20: int main(char* argv[], int argc)

*\ These results wouldn't be shown

maintest.c 43: int main() 45: int argc;

On 2007-11-07 16:58:26 +0000, Leo Davis wrote:

I'm interested in this as well.

I had an idea that may be easier to implement (or harder, I didn't look into it that much).

The idea is to color each search term like Google's cached results, so all terms will appear, but each term will have it's own color (up to about 10 terms).

On 2007-11-15 08:24:23 +0000, Trond Norbye wrote:

I am not sure what i like because:

  1. Sometimes the user format the code in a way that you would cause a single-line-seach-match to miss it. ex: int main(int argc, /* number of items present in argv _/ char _argv) /* arguments blah.. / {
  2. Sometimes I cannot find what I want, since the symbol name is not unique enough (I get hundreds of match), but I do know the context it is used so I could limit the hits by adding another word on the line..

I guess that a checkbox (or a link like we did on the sort order) would be a good compromise?

idodeclare commented 5 years ago

Maybe the existing Lucene support for proximity searches suffices: "main argc"~5