This sounds like a good use case for the proximity search using a single
hop (~1)

On Fri, Sep 16, 2022, 1:40 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