Query not working

Confused as to why a very simple query isn't working. I think I have
everything setup correctly, but have been having difficulty trying to
figure out if it's functioning the way it should.

Here's my setup:

  • Couchdb
  • Couchdb river and index setup
  • Mappings for my objects

When I run my query (which should at least return one result) I get this:
curl -XGET 'http://localhost:9200/syncrswim/Event/_search?q=title:teach'

{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}

Here's my mapping for said object:
curl -XGET 'http://localhost:9200/syncrswim/Event/_mapping'
{"Event":{"properties":{"description":{"type":"string","store":"yes"},"title":{"type":"string","store":"yes"}}}}

and here's my river:
curl -XGET 'http://localhost:9200/_river/syncrswim/_meta'
{"_index":"_river","_type":"syncrswim","_id":"_meta","exists":false}

And my index
curl -XGET 'http://localhost:9200/syncrswim/_status'
{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97},"shards":{"0":[{"routing":{"state":"STARTED","primary":true,"node":"YYRIHgGwTIS_SBvoA4u_SQ","relocating_node":null,"shard":0,"index":"syncrswim"},"state":"STARTED","index":{"size":"98.9kb","size_in_bytes":101373},"translog":{"id":1339435624749,"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97}}]}}}}

Looking at this section:
{"num_docs":24,"max_doc":24,"deleted_docs":0}

Which is the correct number of docs.

Any ideas on why my query isn't returning anything? Thank you :-).

-warner

Silly question, but does your index have a document with teach in the
title? :slight_smile: You did not provide an example of a document. Since your
index is small, you can simply search for all documents:

curl -XGET 'http://localhost:9200/syncrswim/Event/_search?q=*:*&size=25

Perhaps you simply do not have such a document.

--
Ivan

On Mon, Jun 11, 2012 at 3:22 PM, Warner Onstine warnero@gmail.com wrote:

Confused as to why a very simple query isn't working. I think I have
everything setup correctly, but have been having difficulty trying to
figure out if it's functioning the way it should.

Here's my setup:

  • Couchdb
  • Couchdb river and index setup
  • Mappings for my objects

When I run my query (which should at least return one result) I get this:
curl -XGET 'http://localhost:9200/syncrswim/Event/_search?q=title:teach'

{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

Here's my mapping for said object:
curl -XGET 'http://localhost:9200/syncrswim/Event/_mapping'
{"Event":{"properties":{"description":{"type":"string","store":"yes"},"title":{"type":"string","store":"yes"}}}}

and here's my river:
curl -XGET 'http://localhost:9200/_river/syncrswim/_meta'
{"_index":"_river","_type":"syncrswim","_id":"_meta","exists":false}

And my index
curl -XGET 'http://localhost:9200/syncrswim/_status'
{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97},"shards":{"0":[{"routing":{"state":"STARTED","primary":true,"node":"YYRIHgGwTIS_SBvoA4u_SQ","relocating_node":null,"shard":0,"index":"syncrswim"},"state":"STARTED","index":{"size":"98.9kb","size_in_bytes":101373},"translog":{"id":1339435624749,"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97}}]}}}}

Looking at this section:
{"num_docs":24,"max_doc":24,"deleted_docs":0}

Which is the correct number of docs.

Any ideas on why my query isn't returning anything? Thank you :-).

-warner

Uh, yeah I do have a doc with that in the title :P.

Oh, and if I do something like this:
curl -XGET 'localhost:9200/syncrswim/_search' -d '{"query" :
{"match_all" : {}}}'

I do get the docs back:
{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0}
...

And i do see the doc I'm trying to get back in that result set.

but if I try and do a search on /Event/_search I get 0 back. Confused.

And If I try moving it up a level to:
curl -XGET 'http://localhost:9200/syncrswim/_search?q=title:teach'{"took":189,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

I get 0 back again.

-warner

On Mon, Jun 11, 2012 at 3:38 PM, Ivan Brusic ivan@brusic.com wrote:

Silly question, but does your index have a document with teach in the
title? :slight_smile: You did not provide an example of a document. Since your
index is small, you can simply search for all documents:

curl -XGET 'http://localhost:9200/syncrswim/Event/_search?q=*:*&size=25

Perhaps you simply do not have such a document.

--
Ivan

On Mon, Jun 11, 2012 at 3:22 PM, Warner Onstine warnero@gmail.com wrote:

Confused as to why a very simple query isn't working. I think I have
everything setup correctly, but have been having difficulty trying to
figure out if it's functioning the way it should.

Here's my setup:

  • Couchdb
  • Couchdb river and index setup
  • Mappings for my objects

When I run my query (which should at least return one result) I get this:
curl -XGET 'http://localhost:9200/syncrswim/Event/_search?q=title:teach'

{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

Here's my mapping for said object:
curl -XGET 'http://localhost:9200/syncrswim/Event/_mapping'
{"Event":{"properties":{"description":{"type":"string","store":"yes"},"title":{"type":"string","store":"yes"}}}}

and here's my river:
curl -XGET 'http://localhost:9200/_river/syncrswim/_meta'
{"_index":"_river","_type":"syncrswim","_id":"_meta","exists":false}

And my index
curl -XGET 'http://localhost:9200/syncrswim/_status'
{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97},"shards":{"0":[{"routing":{"state":"STARTED","primary":true,"node":"YYRIHgGwTIS_SBvoA4u_SQ","relocating_node":null,"shard":0,"index":"syncrswim"},"state":"STARTED","index":{"size":"98.9kb","size_in_bytes":101373},"translog":{"id":1339435624749,"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97}}]}}}}

Looking at this section:
{"num_docs":24,"max_doc":24,"deleted_docs":0}

Which is the correct number of docs.

Any ideas on why my query isn't returning anything? Thank you :-).

-warner

Ok, weird. I just tried a different title that I could for sure see in
the output above and I get it back. Hmm

curl -XGET 'http://localhost:9200/syncrswim/_search?q=title:Course'
{"took":41,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":1.3472557,
...

So, not sure why it isn't finding a similar doc (that is in my couchdb
and should also be in my ES instance).

Will dig further and see if I can figure this out.

-warner

On Mon, Jun 11, 2012 at 3:40 PM, Warner Onstine warnero@gmail.com wrote:

Uh, yeah I do have a doc with that in the title :P.

Oh, and if I do something like this:
curl -XGET 'localhost:9200/syncrswim/_search' -d '{"query" :
{"match_all" : {}}}'

I do get the docs back:
{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0}
...

And i do see the doc I'm trying to get back in that result set.

but if I try and do a search on /Event/_search I get 0 back. Confused.

And If I try moving it up a level to:
curl -XGET 'http://localhost:9200/syncrswim/_search?q=title:teach'{"took":189,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

I get 0 back again.

-warner

On Mon, Jun 11, 2012 at 3:38 PM, Ivan Brusic ivan@brusic.com wrote:

Silly question, but does your index have a document with teach in the
title? :slight_smile: You did not provide an example of a document. Since your
index is small, you can simply search for all documents:

curl -XGET 'http://localhost:9200/syncrswim/Event/_search?q=*:*&size=25

Perhaps you simply do not have such a document.

--
Ivan

On Mon, Jun 11, 2012 at 3:22 PM, Warner Onstine warnero@gmail.com wrote:

Confused as to why a very simple query isn't working. I think I have
everything setup correctly, but have been having difficulty trying to
figure out if it's functioning the way it should.

Here's my setup:

  • Couchdb
  • Couchdb river and index setup
  • Mappings for my objects

When I run my query (which should at least return one result) I get this:
curl -XGET 'http://localhost:9200/syncrswim/Event/_search?q=title:teach'

{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

Here's my mapping for said object:
curl -XGET 'http://localhost:9200/syncrswim/Event/_mapping'
{"Event":{"properties":{"description":{"type":"string","store":"yes"},"title":{"type":"string","store":"yes"}}}}

and here's my river:
curl -XGET 'http://localhost:9200/_river/syncrswim/_meta'
{"_index":"_river","_type":"syncrswim","_id":"_meta","exists":false}

And my index
curl -XGET 'http://localhost:9200/syncrswim/_status'
{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97},"shards":{"0":[{"routing":{"state":"STARTED","primary":true,"node":"YYRIHgGwTIS_SBvoA4u_SQ","relocating_node":null,"shard":0,"index":"syncrswim"},"state":"STARTED","index":{"size":"98.9kb","size_in_bytes":101373},"translog":{"id":1339435624749,"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97}}]}}}}

Looking at this section:
{"num_docs":24,"max_doc":24,"deleted_docs":0}

Which is the correct number of docs.

Any ideas on why my query isn't returning anything? Thank you :-).

-warner

Oh, I know what it is now. The title was:
Teacher Training Program: Level 2 – Understanding Your World

It finds teacher and understanding, but it won't find "understand".

Config issue of some type?

-warner

On Mon, Jun 11, 2012 at 3:43 PM, Warner Onstine warnero@gmail.com wrote:

Ok, weird. I just tried a different title that I could for sure see in
the output above and I get it back. Hmm

curl -XGET 'http://localhost:9200/syncrswim/_search?q=title:Course'
{"took":41,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":1.3472557,
...

So, not sure why it isn't finding a similar doc (that is in my couchdb
and should also be in my ES instance).

Will dig further and see if I can figure this out.

-warner

On Mon, Jun 11, 2012 at 3:40 PM, Warner Onstine warnero@gmail.com wrote:

Uh, yeah I do have a doc with that in the title :P.

Oh, and if I do something like this:
curl -XGET 'localhost:9200/syncrswim/_search' -d '{"query" :
{"match_all" : {}}}'

I do get the docs back:
{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0}
...

And i do see the doc I'm trying to get back in that result set.

but if I try and do a search on /Event/_search I get 0 back. Confused.

And If I try moving it up a level to:
curl -XGET 'http://localhost:9200/syncrswim/_search?q=title:teach'{"took":189,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

I get 0 back again.

-warner

On Mon, Jun 11, 2012 at 3:38 PM, Ivan Brusic ivan@brusic.com wrote:

Silly question, but does your index have a document with teach in the
title? :slight_smile: You did not provide an example of a document. Since your
index is small, you can simply search for all documents:

curl -XGET 'http://localhost:9200/syncrswim/Event/_search?q=*:*&size=25

Perhaps you simply do not have such a document.

--
Ivan

On Mon, Jun 11, 2012 at 3:22 PM, Warner Onstine warnero@gmail.com wrote:

Confused as to why a very simple query isn't working. I think I have
everything setup correctly, but have been having difficulty trying to
figure out if it's functioning the way it should.

Here's my setup:

  • Couchdb
  • Couchdb river and index setup
  • Mappings for my objects

When I run my query (which should at least return one result) I get this:
curl -XGET 'http://localhost:9200/syncrswim/Event/_search?q=title:teach'

{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

Here's my mapping for said object:
curl -XGET 'http://localhost:9200/syncrswim/Event/_mapping'
{"Event":{"properties":{"description":{"type":"string","store":"yes"},"title":{"type":"string","store":"yes"}}}}

and here's my river:
curl -XGET 'http://localhost:9200/_river/syncrswim/_meta'
{"_index":"_river","_type":"syncrswim","_id":"_meta","exists":false}

And my index
curl -XGET 'http://localhost:9200/syncrswim/_status'
{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97},"shards":{"0":[{"routing":{"state":"STARTED","primary":true,"node":"YYRIHgGwTIS_SBvoA4u_SQ","relocating_node":null,"shard":0,"index":"syncrswim"},"state":"STARTED","index":{"size":"98.9kb","size_in_bytes":101373},"translog":{"id":1339435624749,"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97}}]}}}}

Looking at this section:
{"num_docs":24,"max_doc":24,"deleted_docs":0}

Which is the correct number of docs.

Any ideas on why my query isn't returning anything? Thank you :-).

-warner

You should adapt the mapping of the document type "Event"

The following pages may help you:

-- Tanguy

Le mardi 12 juin 2012 00:46:22 UTC+2, warnero a écrit :

Oh, I know what it is now. The title was:
Teacher Training Program: Level 2 – Understanding Your World

It finds teacher and understanding, but it won't find "understand".

Config issue of some type?

-warner

On Mon, Jun 11, 2012 at 3:43 PM, Warner Onstine warnero@gmail.com
wrote:

Ok, weird. I just tried a different title that I could for sure see in
the output above and I get it back. Hmm

curl -XGET 'http://localhost:9200/syncrswim/_search?q=title:Course'

{"took":41,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":1.3472557,

...

So, not sure why it isn't finding a similar doc (that is in my couchdb
and should also be in my ES instance).

Will dig further and see if I can figure this out.

-warner

On Mon, Jun 11, 2012 at 3:40 PM, Warner Onstine warnero@gmail.com
wrote:

Uh, yeah I do have a doc with that in the title :P.

Oh, and if I do something like this:
curl -XGET 'localhost:9200/syncrswim/_search' -d '{"query" :
{"match_all" : {}}}'

I do get the docs back:

{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0}

...

And i do see the doc I'm trying to get back in that result set.

but if I try and do a search on /Event/_search I get 0 back. Confused.

And If I try moving it up a level to:
curl -XGET 'http://localhost:9200/syncrswim/_search?q=title:teach'{"took":189,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

I get 0 back again.

-warner

On Mon, Jun 11, 2012 at 3:38 PM, Ivan Brusic ivan@brusic.com wrote:

Silly question, but does your index have a document with teach in the
title? :slight_smile: You did not provide an example of a document. Since your
index is small, you can simply search for all documents:

curl -XGET '
http://localhost:9200/syncrswim/Event/_search?q=*:*&size=25

Perhaps you simply do not have such a document.

--
Ivan

On Mon, Jun 11, 2012 at 3:22 PM, Warner Onstine warnero@gmail.com
wrote:

Confused as to why a very simple query isn't working. I think I have
everything setup correctly, but have been having difficulty trying to
figure out if it's functioning the way it should.

Here's my setup:

  • Couchdb
  • Couchdb river and index setup
  • Mappings for my objects

When I run my query (which should at least return one result) I get
this:
curl -XGET '
http://localhost:9200/syncrswim/Event/_search?q=title:teach'

{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

Here's my mapping for said object:
curl -XGET 'http://localhost:9200/syncrswim/Event/_mapping'

{"Event":{"properties":{"description":{"type":"string","store":"yes"},"title":{"type":"string","store":"yes"}}}}

and here's my river:
curl -XGET 'http://localhost:9200/_river/syncrswim/_meta'
{"_index":"_river","_type":"syncrswim","_id":"_meta","exists":false}

And my index
curl -XGET 'http://localhost:9200/syncrswim/_status'

{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97},"shards":{"0":[{"routing":{"state":"STARTED","primary":true,"node":"YYRIHgGwTIS_SBvoA4u_SQ","relocating_node":null,"shard":0,"index":"syncrswim"},"state":"STARTED","index":{"size":"98.9kb","size_in_bytes":101373},"translog":{"id":1339435624749,"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97}}]}}}}

Looking at this section:
{"num_docs":24,"max_doc":24,"deleted_docs":0}

Which is the correct number of docs.

Any ideas on why my query isn't returning anything? Thank you :-).

-warner

When you say I should "adapt" the mapping you don't really say why or
to what. I've read through the links you sent and I'm not sure what
exactly I should be adapting so that I can do a search like
"understand" and have the word "Understanding" match.

I guess I'll dig further in the docs, but I thought that stemming was
on bey default.

-warner

On Tue, Jun 12, 2012 at 12:35 AM, Tanguy tlrx.dev@gmail.com wrote:

You should adapt the mapping of the document type "Event"

The following pages may help you:
Elasticsearch Platform — Find real-time answers at scale | Elastic
Elasticsearch Platform — Find real-time answers at scale | Elastic
Elasticsearch Platform — Find real-time answers at scale | Elastic

-- Tanguy

Le mardi 12 juin 2012 00:46:22 UTC+2, warnero a écrit :

Oh, I know what it is now. The title was:
Teacher Training Program: Level 2 – Understanding Your World

It finds teacher and understanding, but it won't find "understand".

Config issue of some type?

-warner

On Mon, Jun 11, 2012 at 3:43 PM, Warner Onstine warnero@gmail.com wrote:

Ok, weird. I just tried a different title that I could for sure see in
the output above and I get it back. Hmm

curl -XGET 'http://localhost:9200/syncrswim/_search?q=title:Course'

{"took":41,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":1.3472557,
...

So, not sure why it isn't finding a similar doc (that is in my couchdb
and should also be in my ES instance).

Will dig further and see if I can figure this out.

-warner

On Mon, Jun 11, 2012 at 3:40 PM, Warner Onstine warnero@gmail.com
wrote:

Uh, yeah I do have a doc with that in the title :P.

Oh, and if I do something like this:
curl -XGET 'localhost:9200/syncrswim/_search' -d '{"query" :
{"match_all" : {}}}'

I do get the docs back:

{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0}
...

And i do see the doc I'm trying to get back in that result set.

but if I try and do a search on /Event/_search I get 0 back. Confused.

And If I try moving it up a level to:
curl -XGET
'http://localhost:9200/syncrswim/_search?q=title:teach'{"took":189,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

I get 0 back again.

-warner

On Mon, Jun 11, 2012 at 3:38 PM, Ivan Brusic ivan@brusic.com wrote:

Silly question, but does your index have a document with teach in the
title? :slight_smile: You did not provide an example of a document. Since your
index is small, you can simply search for all documents:

curl -XGET
'http://localhost:9200/syncrswim/Event/_search?q=*:*&size=25

Perhaps you simply do not have such a document.

--
Ivan

On Mon, Jun 11, 2012 at 3:22 PM, Warner Onstine warnero@gmail.com
wrote:

Confused as to why a very simple query isn't working. I think I have
everything setup correctly, but have been having difficulty trying to
figure out if it's functioning the way it should.

Here's my setup:

  • Couchdb
  • Couchdb river and index setup
  • Mappings for my objects

When I run my query (which should at least return one result) I get
this:
curl -XGET
'http://localhost:9200/syncrswim/Event/_search?q=title:teach'

{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":}}

Here's my mapping for said object:
curl -XGET 'http://localhost:9200/syncrswim/Event/_mapping'

{"Event":{"properties":{"description":{"type":"string","store":"yes"},"title":{"type":"string","store":"yes"}}}}

and here's my river:
curl -XGET 'http://localhost:9200/_river/syncrswim/_meta'
{"_index":"_river","_type":"syncrswim","_id":"_meta","exists":false}

And my index
curl -XGET 'http://localhost:9200/syncrswim/_status'

{"ok":true,"_shards":{"total":2,"successful":1,"failed":0},"indices":{"syncrswim":{"index":{"primary_size":"98.9kb","primary_size_in_bytes":101373,"size":"98.9kb","size_in_bytes":101373},"translog":{"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97},"shards":{"0":[{"routing":{"state":"STARTED","primary":true,"node":"YYRIHgGwTIS_SBvoA4u_SQ","relocating_node":null,"shard":0,"index":"syncrswim"},"state":"STARTED","index":{"size":"98.9kb","size_in_bytes":101373},"translog":{"id":1339435624749,"operations":0},"docs":{"num_docs":24,"max_doc":24,"deleted_docs":0},"merges":{"current":0,"current_docs":0,"current_size":"0b","current_size_in_bytes":0,"total":0,"total_time":"0s","total_time_in_millis":0,"total_docs":0,"total_size":"0b","total_size_in_bytes":0},"refresh":{"total":2,"total_time":"207ms","total_time_in_millis":207},"flush":{"total":2,"total_time":"97ms","total_time_in_millis":97}}]}}}}

Looking at this section:
{"num_docs":24,"max_doc":24,"deleted_docs":0}

Which is the correct number of docs.

Any ideas on why my query isn't returning anything? Thank you :-).

-warner

I guess I'll dig further in the docs, but I thought that stemming was
on bey default.

No, stemming isn't on by default. Which language would we stem for?
Different languages can have very different structures.

There are many languages supported:

clint