You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by rajani m <ra...@gmail.com> on 2023/10/22 23:35:10 UTC

Num Found of docs containing vector fields

Hi Solr Users,

  How do you query Solr to get a count of the number of docs consisting of
vector fields?  Would you make use of knn qp and populate a query vector of
the same length with 1's? For example, localhost:8983/solr/v9/select?q={!knn
f=vector_field topK=10}[512 dim vector].  Also, this http request with knn
parser usually returns a "414 Request-URI Too Large", what are your
alternatives?

Thank you,
Rajani

Re: Num Found of docs containing vector fields

Posted by ufuk yılmaz <uy...@vivaldi.net.INVALID>.
Hi, I don’t know much about vectors but in order to avoid “414 Request-URI Too Large” error you can send a post request with type application/x-www-form-urlencoded and put q and value in the request body

~ufuk yilmaz
—

> On 23 Oct 2023, at 02:35, rajani m <ra...@gmail.com> wrote:
> 
> 414 Request-URI Too Large


Re: Num Found of docs containing vector fields

Posted by rajani m <ra...@gmail.com>.
Hi Alessandro,

 The range query type does not work, it returns 400 with the response as
"Range Queries are not supported for Dense Vector fields. Please use the
{!knn} query parser to run K nearest neighbors search queries."


On Mon, Oct 23, 2023 at 2:36 AM Alessandro Benedetti <a....@sease.io>
wrote:

> Hi,
> Using the knn query parser is not going to cut it as it's driven by the
> topK parameter (and you do all distance similarity and stuff).
>
> Normally in Solr you just do: field:[* TO *] to retrieve docs that have at
> least one value in a field.
> I can't try right now, can you check if that's implemented correctly?
>
> Cheers
>
> On Mon, 23 Oct 2023, 01:35 rajani m, <ra...@gmail.com> wrote:
>
> > Hi Solr Users,
> >
> >   How do you query Solr to get a count of the number of docs consisting
> of
> > vector fields?  Would you make use of knn qp and populate a query vector
> of
> > the same length with 1's? For example,
> > localhost:8983/solr/v9/select?q={!knn
> > f=vector_field topK=10}[512 dim vector].  Also, this http request with
> knn
> > parser usually returns a "414 Request-URI Too Large", what are your
> > alternatives?
> >
> > Thank you,
> > Rajani
> >
>

Re: Num Found of docs containing vector fields

Posted by rajani m <ra...@gmail.com>.
Hi Alessandro,

 The range query type does not work, it returns 400 with the response as
"Range Queries are not supported for Dense Vector fields. Please use the
{!knn} query parser to run K nearest neighbors search queries."


On Mon, Oct 23, 2023 at 2:36 AM Alessandro Benedetti <a....@sease.io>
wrote:

> Hi,
> Using the knn query parser is not going to cut it as it's driven by the
> topK parameter (and you do all distance similarity and stuff).
>
> Normally in Solr you just do: field:[* TO *] to retrieve docs that have at
> least one value in a field.
> I can't try right now, can you check if that's implemented correctly?
>
> Cheers
>
> On Mon, 23 Oct 2023, 01:35 rajani m, <ra...@gmail.com> wrote:
>
> > Hi Solr Users,
> >
> >   How do you query Solr to get a count of the number of docs consisting
> of
> > vector fields?  Would you make use of knn qp and populate a query vector
> of
> > the same length with 1's? For example,
> > localhost:8983/solr/v9/select?q={!knn
> > f=vector_field topK=10}[512 dim vector].  Also, this http request with
> knn
> > parser usually returns a "414 Request-URI Too Large", what are your
> > alternatives?
> >
> > Thank you,
> > Rajani
> >
>

Re: Num Found of docs containing vector fields

Posted by Alessandro Benedetti <a....@sease.io>.
Hi,
Using the knn query parser is not going to cut it as it's driven by the
topK parameter (and you do all distance similarity and stuff).

Normally in Solr you just do: field:[* TO *] to retrieve docs that have at
least one value in a field.
I can't try right now, can you check if that's implemented correctly?

Cheers

On Mon, 23 Oct 2023, 01:35 rajani m, <ra...@gmail.com> wrote:

> Hi Solr Users,
>
>   How do you query Solr to get a count of the number of docs consisting of
> vector fields?  Would you make use of knn qp and populate a query vector of
> the same length with 1's? For example,
> localhost:8983/solr/v9/select?q={!knn
> f=vector_field topK=10}[512 dim vector].  Also, this http request with knn
> parser usually returns a "414 Request-URI Too Large", what are your
> alternatives?
>
> Thank you,
> Rajani
>

Re: Num Found of docs containing vector fields

Posted by Alessandro Benedetti <a....@sease.io>.
Hi,
Using the knn query parser is not going to cut it as it's driven by the
topK parameter (and you do all distance similarity and stuff).

Normally in Solr you just do: field:[* TO *] to retrieve docs that have at
least one value in a field.
I can't try right now, can you check if that's implemented correctly?

Cheers

On Mon, 23 Oct 2023, 01:35 rajani m, <ra...@gmail.com> wrote:

> Hi Solr Users,
>
>   How do you query Solr to get a count of the number of docs consisting of
> vector fields?  Would you make use of knn qp and populate a query vector of
> the same length with 1's? For example,
> localhost:8983/solr/v9/select?q={!knn
> f=vector_field topK=10}[512 dim vector].  Also, this http request with knn
> parser usually returns a "414 Request-URI Too Large", what are your
> alternatives?
>
> Thank you,
> Rajani
>