My favorites | Sign in
Project Logo
q4e
                
New issue | Search
for
| Advanced search | Search tips
Issue 158: Dependencies with dashes( ex. commons-logging ) doesn't get found when searching
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Jan 2008
Type-Defect
Priority-Low
easy
patch-attached
iam-ip-review


Sign in to add a comment
 
Reported by emantos, Dec 11, 2007
When you search for dependencies in the Dependency Lookup dialog ( Maven 2
> Manage Dependencies > New > ... (lookup) ), if your searching a
dependency with a dash (-) like commons-logging, or probably any characters
lucene uses as special character, it won't be found.

There is a problem either in
     - how q4e searches the lucene index
         or
     - how q4e creates the index based on the local repo
         or
     - both.

Anybody with lucene experience are welcome to take a look. The lucene
indexing and searching are in RepositoryIndexer.java or
RepositoryIndexerManager.java.
Comment 1 by amuino, Dec 28, 2007
Tagging as "easy" since it seems only a matter of escaping the right chars.
More info on special lucene chars can be found at the bottom of
http://lucene.apache.org/java/docs/queryparsersyntax.html 
Labels: easy
Comment 2 by amuino, Dec 28, 2007
(No comment was entered for this change.)
Status:
Owner: ---
Comment 3 by robdale, Dec 28, 2007
I'll fix this.  The problem is in both the indexer and searcher -
plugins/maven/ui/src/main/java/org/devzuz/q/maven/ui/core/RepositoryIndexer.java

Comment 4 by amuino, Dec 28, 2007
Looking forward to receiving your patch!
Comment 5 by robdale, Dec 30, 2007
 - Using query parser to enable search on any field
   - g: groupId
   - a: artifactId
   - v: versionId
   - default is f: full name (groupdId + artifactId + versionId)
 - Removed JAR_NAME, seemed to be unused
 - find-as-you-type
 - preventing dupes in the lucene index - improved indexing speed
 - Index should be smaller since it's no longer storing the fullname, jar name fields
and duplicates (ex. 220k -> 88k)
 - sortable columns
 - upgrade to lucene 2.2.0 (fixes wildcard bug)
 - left-justify columns - I find this much easier to read

Search examples: (queries are AND by default)

 basic: "c" -> "f:c*"
        "commons-logging" -> "f:commons-logging*"
        "commons logging" -> "+f:commons +f:logging*" - this won't match anything

advanced: "g:*log* v:[1.0.0 TO 1.0.9]"

caveat: the query parser lowers case when using wildcard
        "v:1.0-SNAPSHOT" matches "1.0-SNAPSHOT"
        "v:1.0-SNAP*" -> "v:1.0-snap*" does not match "1.0-SNAPSHOT"
        "v:*alpha*" matches "1.0-alpha-5"

search.patch
27.7 KB Download
Comment 6 by robdale, Jan 02, 2008
Probably should have mentioned that you will have to rebuild your index:  exit
eclipse; rm -rf ~/.m2index; open eclipse.  Next time you open the search dialog, you
will have to wait for the index rebuild job to finish before searching.
Comment 7 by emantos, Jan 07, 2008
Applied the patch already. Thank you very much.
Status: Fixed
Comment 8 by amuino, Nov 24, 2008
(No comment was entered for this change.)
Labels: patch-attached
Comment 9 by amuino, Nov 24, 2008
(No comment was entered for this change.)
Labels: iam-ip-review
Sign in to add a comment

Hosted by Google Code