I am trying to install Elasticsearch 1.0.1 on Ubuntu 12.04. So far I have done:
First I removed the old elasticsearch 0.90 package
sudo dpkg -r elasticsearch
Then
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb
sudo dpkg -i elasticsearch-1.0.1.deb
The last step results in the following
(Reading database ... 57341 files and directories currently installed.)
Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...
Unpacking replacement elasticsearch ...
Setting up elasticsearch (1.0.1) ...
chown: cannot access `/etc/elasticsearch/*': No such file or directory
So I created /etc/elasticsearch with a dummy file in it and then did
sudo chmod 777 /etc/elasticsearch
Now when I run
sudo dpkg -i elasticsearch-1.0.1.deb
I get
(Reading database ... 57341 files and directories currently installed.)
Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...
Unpacking replacement elasticsearch ...
Setting up elasticsearch (1.0.1) ...
Processing triggers for ureadahead ...
But nothing appears in /etc/elasticsearch
However I do get a folder appear in
/usr/share/elasticsearch
With the following contents
bin core-signatures.txt lib NOTICE.txt README.textile
From here if I run
sudo bin/elasticsearch
I get
log4j:WARN No appenders could be found for logger (node). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
And continues to run
If I open a new window and run
curl -XGET 'localhost:9200'
I get
{
"status" : 200,
"name" : "Volstagg",
"version" : {
"number" : "1.0.1",
"build_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",
"build_timestamp" : "2014-02-25T15:52:53Z",
"build_snapshot" : false,
"lucene_version" : "4.6"
},
"tagline" : "You Know, for Search"
}
So it appears to be running, and I can populate the search (symfony2 FOSElasticaBundle) with
php app/console fos:elastica:populate
But if I do a search no results are found.
So the question is please, has it installed or not and why isn't it working properly?
I am using the github.com/FriendsOfSymfony/FOSElasticaBundle with Symfony2 PHP framework. The config for the bundle is this:
fos_elastica:
clients:
default: { host: localhost, port: 9200 }
indexes:
products:
client: default
types:
product:
mappings:
name: { boost: 5 }
commonName: { boost: 5 }
sku: { boost: 3 }
description:
isRemedy:
countries:
type: "nested"
properties:
code: ~
book:
type: "nested"
properties:
author: ~
isbn: ~
persistence:
driver: orm
model: Helios\CoreBundle\Entity\Product
provider: ~
finder: ~
listener: ~
elastica_to_model_transformer:
ignore_missing: true
When I populate I don't get any errors, but still the search does not work.
Thanks
Not sure why you cannot search, but there are a few things that you can check. On this page the paths to configuration files are mentioned.
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-service.html
To check if everything is fine by running queries like: /_cluster/health /_nodes/stats
Hope that helps