Re: howto sum of terms of specific field in index

2017-12-21 Thread Emir Arnautović
Hi Bernd, > Shouldn't it be: > freq(doc2, fieldX:A) = 4 (A appears 4 times in doc 2) Yes - that’s how it should be. Regards, Emir -- Monitoring - Log Management - Alerting - Anomaly Detection Solr & Elasticsearch Consulting Support Training - http://sematext.com/ > On 21 Dec 2017, at 10:35,

Re: howto sum of terms of specific field in index

2017-12-21 Thread Bernd Fehling
Hi Emir, thank you, thats it. But a question while reading the docs about sumTotalTermFreq from your link. Example in the docs: If doc1:(fieldX:A B C) and doc2:(fieldX:A A A A): ... freq(doc1, fieldX:A) = 4 (A appears 4 times in doc 2) Shouldn't it be: freq(doc2, fieldX:A)

Re: howto sum of terms of specific field in index

2017-12-21 Thread Emir Arnautović
HI Bernd, It seems to me that you are looking for sumTotalTermFreq function. https://lucene.apache.org/solr/guide/6_6/function-queries.html HTH, Emir -- Monitoring - Log Management - Alerting - Anomaly Detection Solr &

howto sum of terms of specific field in index

2017-12-21 Thread Bernd Fehling
Hi list, actually a simple question, but somehow i can't figure out how to get the total number of terms in a field in the index, example: record_1: fruit: apple, banana, cherry record_2: fruit: apple, pineapple, cherry record_3: fruit: kiwi, pineapple record_4: fruit: - a search for fruit:*