A query I believe should work, doesn't seem to

I've loaded an ES instance with some sample data and while the queries
in the documentation seem to work, I'm missing something when I try to
get the same queries to work against my data.

This query does not return any results:

curl -XGET localhost:9200/music/song/_search?q=artist:"Quarashi"

Here is how I loaded the data:

curl -XPOST http://localhost:9200/music/song -d '
{
song_id : "00000000000000009771",
title : "Malone Lives",
version : "Clean Version",
artist : "Quarashi",
year : "2002",
genre : "Pop",
label : "Time Bomb Recordings",
album_title : ""
}'

Sorry for the rather simply question, I'll ask more interesting
questions as I get further into this project.

Dan

On Thu, 2010-03-04 at 10:27 -0800, Daniel O'Neill wrote:

I've loaded an ES instance with some sample data and while the queries
in the documentation seem to work, I'm missing something when I try to
get the same queries to work against my data.

This query does not return any results:

curl -XGET localhost:9200/music/song/_search?q=artist:"Quarashi"

It works for me, are you using the latest version from git?

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.

Version: elasticsearch-0.4.0
not from git.

Here's the actual transcript:

$ curl -XPOST http://localhost:9200/music/song -d '

{
song_id : "00000000000000009771",
title : "Malone Lives",
version : "Clean Version",
artist : "Quarashi",
year : "2002",
genre : "Pop",
label : "Time Bomb Recordings",
album_title : ""

}'
{"ok":true,"_index":"music","_type":"song","_id":"7520c46e-5951-4a8c-88ec-8bdca9e2a849"}

$ curl -XGET localhost:9200/music/song/_search?q=artist:"Quarashi"
{"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":
0,"hits":}}

While this query does work:

$ curl -XGET localhost:9200/music/song/_search?q=year:"2002"
{"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":
1,"hits":
[{"_index":"music","_type":"song","_id":"7520c46e-5951-4a8c-88ec-8bdca9e2a849",
"_source" :
{
song_id : "00000000000000009771",
title : "Malone Lives",
version : "Clean Version",
artist : "Quarashi",
year : "2002",
genre : "Pop",
label : "Time Bomb Recordings",
album_title : ""

}}]}}

On Mar 4, 10:38 am, Clinton Gormley clin...@iannounce.co.uk wrote:

It works for me, are you using the latest version from git?

clint

On Thu, 2010-03-04 at 10:57 -0800, Daniel O'Neill wrote:

Version: elasticsearch-0.4.0
not from git.

Not knowing anything about the internals, I'd say it is likely that
this has something to do with bugs that existed in mapping.

A lot has changed in the latest version from github, a lot of bugs have
been fixed. I would recommend using it over the 0.4 release.

It's dead easy to compile. On linux, you'd do something like this:

cd ~
git clone git://github.com/elasticsearch/elasticsearch.git
cd elasticsearch
./gradlew

cd /path/where/you/want/elasticsearch
unzip ~/elasticsearch/distributions/elasticsearch*

hth

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.

Since I'm just going through getting all this stuff to work on an
Ubuntu 9.10 system, I may as well document some of the packages that
aren't installed by default that are needed for elasticsearch

apt-get install curl
apt-get install sun-java6-bin
apt-get install sun-java6-jdk
apt-get install git-core

(I may have missed a few packages, but the above should get things
going)

The build instructions are great, just one minor bug, in the unzip
line:

cd ~
git clone git://github.com/elasticsearch/elasticsearch.git
cd elasticsearch
./gradlew

cd /path/where/you/want/elasticsearch
unzip ~/elasticsearch/build/distributions/elasticsearch*

Version 0.5.0-SNAPSHOT fixes the problem I presented earlier. Clinton,
thank you very much for your help.

Dan

On Mar 4, 11:07 am, Clinton Gormley clin...@iannounce.co.uk wrote:

On Thu, 2010-03-04 at 10:57 -0800, Daniel O'Neill wrote:

Version: elasticsearch-0.4.0
not from git.

Not knowing anything about the internals, I'd say it is likely that
this has something to do with bugs that existed in mapping.

A lot has changed in the latest version from github, a lot of bugs have
been fixed. I would recommend using it over the 0.4 release.

It's dead easy to compile. On linux, you'd do something like this:

cd ~
git clone git://github.com/elasticsearch/elasticsearch.git
cd elasticsearch
./gradlew

cd /path/where/you/want/elasticsearch
unzip ~/elasticsearch/distributions/elasticsearch*

hth

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.

The build instructions are great, just one minor bug, in the unzip
line:

thanks for spotting that

clint

Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.

Yea, current master is much more stable than 0.4. Expect 0.5 to be released
any day... .

-shay.banon

On Thu, Mar 4, 2010 at 9:45 PM, Clinton Gormley clinton@iannounce.co.ukwrote:

The build instructions are great, just one minor bug, in the unzip
line:

thanks for spotting that

clint

Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.