librelist archives

« back to archive

improved lein search filtering?

improved lein search filtering?

From:
Dave Tenny
Date:
2013-11-30 @ 16:48
Is there a way to pass more complicated (filter intensive) searches to
"lein search"?

Take this example:

$ lein -o search shell
Performing task 'search' with profile(s): 'default,offline'
Searching over Artifact ID...
 == Showing page 1 / 86
[org.sonatype.gshell.commands/gshell-shell "2.4"]
[org.sonatype.gshell.commands/gshell-shell "2.4" :classifier "sources"]
[org.sonatype.gshell.commands/gshell-shell "2.4" :classifier "javadoc"]
[org.sonatype.gshell.commands/gshell-shell "2.3.1"]
[org.sonatype.gshell.commands/gshell-shell "2.3.1" :classifier "sources"]
[org.sonatype.gshell.commands/gshell-shell "2.3.1" :classifier "javadoc"]
[org.sonatype.gshell.commands/gshell-shell "2.3"]

... followed by all the org.sonatype.gshell point releases down to 2.0,
which aren't of particular interest, followed next by

[org.openengsb.branding/openengsb-branding-shell "1.3.0.M3" :packaging
"bundle"] Brands the Karaf shell with the OpenEngSB logo
[org.openengsb.branding/openengsb-branding-shell "1.3.0.M3" :classifier
"sources"] Brands the Karaf shell with the OpenEngSB logo
[org.openengsb.branding/openengsb-branding-shell "1.3.0.M2" :packaging
"bundle"] Brands the Karaf shell with the OpenEngSB logo
[org.openengsb.branding/openengsb-branding-shell "1.3.0.M2" :classifier
"sources"] Brands the Karaf shell with the OpenEngSB logo
[org.openengsb.branding/openengsb-branding-shell "1.3.0.M1" :packaging
"bundle"] Brands the Karaf shell with the OpenEngSB logo

... which goes on to fill the rest of the first page of 86 pages of search
results.

What I really want is a unique list of artifacts that match, or just the
most recent version of a kit, and so on.

Under no circumstances do I want 86 pages of stuff that I have to page
through with 86 lein search commands followed by a page number.

I'm new to leiningen, so perhaps I just missed some search docs.  What's
available to improve searches?  I thought to use some additional lucene
query terms/operators, but I can't see how to fit that into the documented
command syntax.

Thanks for any tips!