Solr : how to get the frequency of an expression

Viewed 17

I'm looking for a way to get the frequency of an expression (multiple words in order, not only one word).

By example, I want to know the number of occurence of the expression "from parents" in the whole index.

I know how to do for each word by using terms.fl:

http://localhost:8983/solr/core_test/select?q=content:(%22from+parents%22)&terms=true&terms.ttf=true&terms.list=from%2Cparents&terms.fl=content

which gives me the number of occurence of "from" and "parents", but separated, not as an expression.

I also tried with terms.regex with something like :

http://localhost:8983/solr/core_test/select?q=content:(%22from+parents%22)&terms=true&terms.ttf=true&terms.fl=content&terms.regex=*from%20parents*

But nothing works :(. Any idea please.

0 Answers
Related