Allowing search from command line

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Allowing search from command line

Michael Wechner
Hi

I think it would be nice if bin/nutch would contain a search option, e.g.

+  echo "  search            search an index for a keyword"
   echo "  merge             merge several segment indexes"
   echo "  dedup             remove duplicates from a set of segment
indexes"
   echo "  plugin            load a plugin and run one of its classes
main()"
@@ -154,6 +155,8 @@
   CLASS=org.apache.nutch.parse.ParseSegment
 elif [ "$COMMAND" = "readdb" ] ; then
   CLASS=org.apache.nutch.crawl.CrawlDbReader
+elif [ "$COMMAND" = "search" ] ; then
+  CLASS=org.apache.nutch.tools.CommandLineSearch

which would allow to test the "crawl" more quickly than first having to
setup the WAR file.

WDYT?

Thanks

Michi

--
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
[hidden email]                        [hidden email]
+41 44 272 91 61

Reply | Threaded
Open this post in threaded view
|

Re: Allowing search from command line

Michael Wechner
Michael Wechner wrote:

>
> which would allow to test the "crawl" more quickly than first having
> to setup the WAR file.
>
> WDYT?


whereas I guess this would be similar to

sh bin/nutch org.apache.nutch.searcher.NutchBean WORD

resp.

sh bin/nutch search WORD

which I think would be nicer ;-)

Michi

>
> Thanks
>
> Michi
>


--
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
[hidden email]                        [hidden email]
+41 44 272 91 61