If I search a word in a SOLR index I get a document count for documents which contain this word, but if the word is included more times in a document, the total count is still 1 per document.
I need every returned document is counted for the number of times they have the searched word in the field.
I read Word frequency in Solr and SOLR term frequency and I enabled the Term Vector Component, but it does not work.
I configured my field in this way:
<field name="text_text" type="textgen" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" />
But if I make the following query:
http://localhost:8888/solr/sources/select?q=text_text%3A%22Peter+Pan%22&fl=text_text&wt=json&indent=true&tv.tf
I don't have any count:
{
"responseHeader":{
"status":0,
"QTime":1,
"params":{
"fl":"text_text",
"tv.tf":"",
"indent":"true",
"q":"text_text:\"Peter Pan\"",
"wt":"json"}},
"response":{"numFound":12,"start":0,"docs":[
{
"text_text":"Text of the document"},
{
"text_text":"Text of the document"},
{
"text_text":"Text of the document"},
{
"text_text":"Text of the document"},
{
"text_text":"Text of the document"},
{
"text_text":"Text of the document"},
{
"text_text":"Text of the document"},
{
"text_text":"Text of the document"}]
}}
I see a "numFound" value of 12, but the word "Peter Pan" is included 20 times in all 12 documents.
Could you help me to find where I'm wrong, please?
Thank you very much!
tv=true&tv.tf=true
. – Wiperhttp://localhost:8983/solr/collection1/spell?q=theq&wt=json&indent=true&fl=ttf(term,the)
and (II) Term freq =>http://localhost:8983/solr/collection1/spell?q=gram:%22ago%22&rows=100&fl=gram,termfreq(gram,ago)
– Catawba