Number of results to equal number of times query appears in document

Hello,
I'm using Elastica, a PHP implementation of Elastic Search, and I was told
something could not be done in Elastica because it can not be done with
Elastic Search and I am just checking if it really can not be done with
Elastic Search.

Right now, if a query is found in a document that counts as one result. If
the query is found in another document that counts as one result.
Is there a way I can get the results to match the number of times a query
is in the document instead of one result per document.
Like a browser's ctrl / cmd + f functionality returns 3 if the query is
found 3 times in a document.

Please let me know if this is possible and how.

I would greatly appreciate any and all help!

Thanks in Advance!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You could potentially enabled explain on the query, then for each document
you can extract the term frequency of the term from the explain object.
Term frequencies need to be enabled on the field. You might encounter
issues depending on how the text is analyzed, especially if you apply
stemming.

--
Ivan

On Tue, Apr 9, 2013 at 10:29 AM, irfan mir theirf@gmail.com wrote:

Hello,
I'm using Elastica, a PHP implementation of Elastic Search, and I was told
something could not be done in Elastica because it can not be done with
Elastic Search and I am just checking if it really can not be done with
Elastic Search.

Right now, if a query is found in a document that counts as one result. If
the query is found in another document that counts as one result.
Is there a way I can get the results to match the number of times a query
is in the document instead of one result per document.
Like a browser's ctrl / cmd + f functionality returns 3 if the query is
found 3 times in a document.

Please let me know if this is possible and how.

I would greatly appreciate any and all help!

Thanks in Advance!

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.