allenai / semanticilp

Question Answering as Global Reasoning over Semantic Abstractions (AAAI-18)
Apache License 2.0
33 stars 13 forks source link

Elastic Search cluster missing #5

Open gurpreet14 opened 6 years ago

gurpreet14 commented 6 years ago

I managed to start all the servers mentioned in the README. When a request is made over the network, the following error shows up in the browser:

Execution exception 
[IllegalArgumentException: Address must be resolved but wasn't - InetSocketAddress#getAddress() returned null]

In /home/semanticilp/src/main/scala/org/allenai/ari/solvers/textilp/utils/SolverUtils.scala:159
155      .put("client.transport.sniff", false)
156      .put("sniffOnConnectionFault", false)
157      .build()
158    val host = Constants.elasticBeingUsed.hostIp
159    val address = new InetSocketTransportAddress(new InetSocketAddress(host, Constants.elasticBeingUsed.hostPort))
160    println(s"Created Elastic Search Client in cluster ${Constants.elasticBeingUsed.clusterName}")
161    val clientBuilder = TransportClient.builder().settings(settings)
162    clientBuilder.build().addTransportAddress(address)
163  }

This is the request http://localhost:9000/solveQuestion?question="A decomposer is an organism that"&options="hunts and eats animals//migrates for the winter//breaks down dead plants and animals//uses water and sunlight to make food//"&snippet=""

I believe, this issue is due to the fact that the elastic search cluster on hostIp aristo-es.dev.ai2 is not accessible.

What are the steps to setup this cluster locally? I have installed elastic search locally and would like to know what steps would I need to do next to make this work.

Thanks.

danyaljj commented 6 years ago

Sorry for the delay.

The elasticsearch server you pointed out, is hosted by AI2 for their internal use (as you can probably tell by the URLs in the code) and they are not open to the public. What this elasticsearch does is to find paragraphs (snippets) that could potentially answer the given input question.

To learn how to setup your own elastic search, have a look into the tutorials in the web (e.g. this). After running your ES, you have to populate it with an index. This can be a text document (say, extracted from wikipedia), with one sentence per line.

Alternatively, you can bring some paragraphs along your questions (say crawling the internet via search engines).