Query help

Hi

I am struggling with what I thought should be a simple query. Here is
a data example:

{paragraphs=[
{important=true, wordCount=122, text="blah blah blah..."},
{important=false, wordCount=31, text="some more blah blah blah"} ],
author="sally",
postDate=2010-07-06}

I am trying to find documents that have a "paragraphs.text" that match
passed in keywords (easy), but I want to score the "value" of the
document that matched based on paragraph's associated "wordCount" and
"important" properties. More specifically, I want to favor the hits
that are on paragraphs that are important=true and have a low word
count.

I can see the SQL and code to do it in my head, but after
experimenting and digging through the docs, I am stumped on how to do
it with ES. Any help is greatly appreciated!
Sally

I think that what you are looking for is this feature:
Issues · elastic/elasticsearch · GitHub which
will be part of 0.9.

-shay.banon

On Tue, Jul 6, 2010 at 10:02 PM, sallyjones sallybop291@yahoo.com wrote:

Hi

I am struggling with what I thought should be a simple query. Here is
a data example:

{paragraphs=[
{important=true, wordCount=122, text="blah blah blah..."},
{important=false, wordCount=31, text="some more blah blah blah"} ],
author="sally",
postDate=2010-07-06}

I am trying to find documents that have a "paragraphs.text" that match
passed in keywords (easy), but I want to score the "value" of the
document that matched based on paragraph's associated "wordCount" and
"important" properties. More specifically, I want to favor the hits
that are on paragraphs that are important=true and have a low word
count.

I can see the SQL and code to do it in my head, but after
experimenting and digging through the docs, I am stumped on how to do
it with ES. Any help is greatly appreciated!
Sally

Thanks for the quick response, and thats a very nice feature. Does
the latest version of the source include the 0.9 features or do I need
to wait for an official 0.9 release?

Its already in master, so if you want to try it, you can build from source
and give it a go.

-shay.banon

On Tue, Jul 6, 2010 at 11:01 PM, sallyjones sallybop291@yahoo.com wrote:

Thanks for the quick response, and thats a very nice feature. Does
the latest version of the source include the 0.9 features or do I need
to wait for an official 0.9 release?

Thanks, I'll let you know how it goes.