A search engine for IRC logs based on Lucene
Go to file
Abhinav Sarkar 75004747b3 Some more scalafication 2013-05-23 10:26:34 +05:30
src/main/scala/net/abhinavsarkar/ircsearch Some more scalafication 2013-05-23 10:26:34 +05:30
.gitignore Initial commit, created a basic server based on netty 2013-05-13 02:24:14 +05:30
.travis.yml Added travis yml file 2013-05-22 23:37:51 +05:30
README.md Added README 2013-05-13 20:19:16 +05:30
irc-search.conf Moved out configuration to external file 2013-05-22 23:28:40 +05:30
pom.xml Some more scalafication 2013-05-23 10:26:34 +05:30

README.md

A search engine for IRC logs. Based on Lucene and Netty. Runs as an HTTP server, exposing REST endpoints for indexing and searching.

Build and Run

First install Apache Maven. Then execute this command to run the server at port 9090:

mvn package && java -cp target/dependency/*:target/* net.abhinavsarkar.ircsearch.Server 9090

Index chat lines

$ cat ireq | json_pp
{
   "botName" : "some",
   "chatLines" : [
      {
         "timestamp" : 12312312312,
         "user" : "abhinav",
         "message" : "hi"
      },
      {
         "timestamp" : 12312312312,
         "user" : "abhinav",
         "message" : "hi"
      }
   ],
   "channel" : "as",
   "server" : "ima"
}

$ curl -X POST -d @ireq localhost:9090/index
$ cat sreq | json_pp
{
   "botName" : "some",
   "page" : 0,
   "query" : "hi user:abhinav",
   "channel" : "as",
   "server" : "ima",
   "pageSize" : 10
}

$ curl -X POST -d @sreq localhost:9090/search -s | json_pp
{
   "page" : 0,
   "query" : "hi user:abhinav",
   "channel" : "as",
   "pageSize" : 10,
   "botName" : "some",
   "chatLines" : [
      {
         "timestamp" : 12312312312,
         "user" : "abhinav",
         "message" : "hi"
      },
      {
         "timestamp" : 12312312312,
         "user" : "abhinav",
         "message" : "hi"
      }
   ],
   "server" : "ima",
   "totalResults" : 24
}