Searching the term using Facet Query

hi all,

i m creating index like....

curl -XPOST 'http://localhost:9200/foo/bar?pretty=1' -d '
{
"text" : [
"abc xyz abc def abc xyz",
"abc xyz abc"
]
}
'

and when i am searching for "abc" then i want count like "abc" : "5","xyz" : "3" ,"def" :"1"
and when i m searching for "abc xyz" then i want count like "abc xyz" : "3","abc" : "2","def" : "1"
and when i m searching for "abc xyz abc" then i want count like "abc xyz abc" : "2","abc" : "1","xyz" : "1","abc" : "1"

please help me as soon as possible..

Rgds,
Sumit Gupta

You could potentially use query facets, and have a query yourself broken
down based on the provided text, you can have several query facet (a query
facet is a simple one that returns count for hte docs matching the query).

On Wed, Apr 25, 2012 at 9:55 AM, Sumit Guptaa sumit.gupta.ngi@gmail.comwrote:

hi all,

i m creating index like....

curl -XPOST 'http://localhost:9200/foo/bar?pretty=1' -d '
{
"text" : [
"abc xyz abc def abc xyz",
"abc xyz abc"
]
}
'

and when i am searching for "abc" then i want count like "abc" : "5","xyz"
:
"3" ,"def" :"1"
and when i m searching for "abc xyz" then i want count like "abc xyz" :
"3","abc" : "2","def" : "1"
and when i m searching for "abc xyz abc" then i want count like "abc xyz
abc" : "2","abc" : "1","xyz" : "1","abc" : "1"

please help me as soon as possible..

Rgds,
Sumit Gupta

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Searching-the-term-using-Facet-Query-tp3937476p3937476.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

hi
thanx shay

sir please give me example for this implementation....it would be good for me...

Regards,
Sumit Gupta

On Fri, Apr 27, 2012 at 6:32 AM, Sumit Guptaa sumit.gupta.ngi@gmail.comwrote:

hi
thanx shay

sir please give me example for this implementation....it would be good for
me...

Regards,
Sumit Gupta

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Searching-the-term-using-Facet-Query-tp3937476p3944057.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.