How fast can you rebuild your index?  If it’s trivial make a new field for that 
field and utilize shingles with a two term specification and you *should be 
able to get what you want but I can’t test it right now, but in theory it would 
work

> On Sep 16, 2022, at 1:39 PM, Audrey Tesrin <ates...@gmail.com> wrote:
> 
> Hi,
> 
> I’m writing you because I’m completely blocked with a Solr query issue I have 
> absolutely no idea how to correct.
> 
> 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.
> 
> Thank you so much for your help,
> Best,
> Audrey

Reply via email to