You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Vincenzo D'Amore <v....@gmail.com> on 2025/06/16 15:37:26 UTC
How to filter documents missing a dense vector (knn_vector) field
Hi all,
I’m using Solr (version 9.8.1) with a knn_vector field and I’d like to
filter for documents that *do not have* this vector field populated.
I tried using the query:
-my_vector:[* TO *]
…but Solr returns the following error:
*“Range Queries are not supported for Dense Vector fields. Please use the
{!knn} query parser to run K nearest neighbors search queries.”*
Is there a supported way to filter documents that *do not have a value for
a knn_vector field* (i.e., the field is missing)?
Any suggestions or workarounds would be appreciated.
Thanks, Vincenzo
--
Vincenzo D'Amore
Re: How to filter documents missing a dense vector (knn_vector) field
Posted by Jonty Rhods <jo...@gmail.com>.
On Tue, 17 Jun 2025 at 1:39 am, Vincenzo D'Amore <v....@gmail.com> wrote:
> Hi all,
>
> I’m using Solr (version 9.8.1) with a knn_vector field and I’d like to
> filter for documents that *do not have* this vector field populated.
>
> I tried using the query:
>
> -my_vector:[* TO *]
>
> …but Solr returns the following error:
>
> *“Range Queries are not supported for Dense Vector fields. Please use the
> {!knn} query parser to run K nearest neighbors search queries.”*
>
> Is there a supported way to filter documents that *do not have a value for
> a knn_vector field* (i.e., the field is missing)?
>
> Any suggestions or workarounds would be appreciated.
>
> Thanks, Vincenzo
>
> --
> Vincenzo D'Amore
>
Re: How to filter documents missing a dense vector (knn_vector) field
Posted by Robi Petersen <ro...@gmail.com>.
Ok so that works for normal fields but to retrieve vector fields I've seen
recommendations of also storing the vector fields contents in a normal
field for retrieval which you also use the above syntax against...
Thx
Robi
On Mon, Jun 16, 2025, 9:15 AM Vincenzo D'Amore <v....@gmail.com> wrote:
> Thanks for your prompt reply, but unfortunately:
>
> -my_vector:* returns the error message "Field Queries are not supported
> for Dense Vector fields. Please use the {!knn} query parser to run K
> nearest neighbors search queries."
>
>
> On Mon, Jun 16, 2025 at 5:47 PM Robi Petersen <ro...@gmail.com> wrote:
>
> > -my_vector:*
> >
> > On Mon, Jun 16, 2025, 8:39 AM Vincenzo D'Amore <v....@gmail.com>
> wrote:
> >
> > > Hi all,
> > >
> > > I’m using Solr (version 9.8.1) with a knn_vector field and I’d like to
> > > filter for documents that *do not have* this vector field populated.
> > >
> > > I tried using the query:
> > >
> > > -my_vector:[* TO *]
> > >
> > > …but Solr returns the following error:
> > >
> > > *“Range Queries are not supported for Dense Vector fields. Please use
> the
> > > {!knn} query parser to run K nearest neighbors search queries.”*
> > >
> > > Is there a supported way to filter documents that *do not have a value
> > for
> > > a knn_vector field* (i.e., the field is missing)?
> > >
> > > Any suggestions or workarounds would be appreciated.
> > >
> > > Thanks, Vincenzo
> > >
> > > --
> > > Vincenzo D'Amore
> > >
> >
>
>
> --
> Vincenzo D'Amore
>
Re: How to filter documents missing a dense vector (knn_vector) field
Posted by Robi Petersen <ro...@gmail.com>.
Ok so that works for normal fields but to retrieve vector fields I've seen
recommendations of also storing the vector fields contents in a normal
field for retrieval which you also use the above syntax against...
Thx
Robi
On Mon, Jun 16, 2025, 9:15 AM Vincenzo D'Amore <v....@gmail.com> wrote:
> Thanks for your prompt reply, but unfortunately:
>
> -my_vector:* returns the error message "Field Queries are not supported
> for Dense Vector fields. Please use the {!knn} query parser to run K
> nearest neighbors search queries."
>
>
> On Mon, Jun 16, 2025 at 5:47 PM Robi Petersen <ro...@gmail.com> wrote:
>
> > -my_vector:*
> >
> > On Mon, Jun 16, 2025, 8:39 AM Vincenzo D'Amore <v....@gmail.com>
> wrote:
> >
> > > Hi all,
> > >
> > > I’m using Solr (version 9.8.1) with a knn_vector field and I’d like to
> > > filter for documents that *do not have* this vector field populated.
> > >
> > > I tried using the query:
> > >
> > > -my_vector:[* TO *]
> > >
> > > …but Solr returns the following error:
> > >
> > > *“Range Queries are not supported for Dense Vector fields. Please use
> the
> > > {!knn} query parser to run K nearest neighbors search queries.”*
> > >
> > > Is there a supported way to filter documents that *do not have a value
> > for
> > > a knn_vector field* (i.e., the field is missing)?
> > >
> > > Any suggestions or workarounds would be appreciated.
> > >
> > > Thanks, Vincenzo
> > >
> > > --
> > > Vincenzo D'Amore
> > >
> >
>
>
> --
> Vincenzo D'Amore
>
Re: How to filter documents missing a dense vector (knn_vector) field
Posted by Vincenzo D'Amore <v....@gmail.com>.
Thanks for your prompt reply, but unfortunately:
-my_vector:* returns the error message "Field Queries are not supported
for Dense Vector fields. Please use the {!knn} query parser to run K
nearest neighbors search queries."
On Mon, Jun 16, 2025 at 5:47 PM Robi Petersen <ro...@gmail.com> wrote:
> -my_vector:*
>
> On Mon, Jun 16, 2025, 8:39 AM Vincenzo D'Amore <v....@gmail.com> wrote:
>
> > Hi all,
> >
> > I’m using Solr (version 9.8.1) with a knn_vector field and I’d like to
> > filter for documents that *do not have* this vector field populated.
> >
> > I tried using the query:
> >
> > -my_vector:[* TO *]
> >
> > …but Solr returns the following error:
> >
> > *“Range Queries are not supported for Dense Vector fields. Please use the
> > {!knn} query parser to run K nearest neighbors search queries.”*
> >
> > Is there a supported way to filter documents that *do not have a value
> for
> > a knn_vector field* (i.e., the field is missing)?
> >
> > Any suggestions or workarounds would be appreciated.
> >
> > Thanks, Vincenzo
> >
> > --
> > Vincenzo D'Amore
> >
>
--
Vincenzo D'Amore
Re: How to filter documents missing a dense vector (knn_vector) field
Posted by Vincenzo D'Amore <v....@gmail.com>.
Thanks for your prompt reply, but unfortunately:
-my_vector:* returns the error message "Field Queries are not supported
for Dense Vector fields. Please use the {!knn} query parser to run K
nearest neighbors search queries."
On Mon, Jun 16, 2025 at 5:47 PM Robi Petersen <ro...@gmail.com> wrote:
> -my_vector:*
>
> On Mon, Jun 16, 2025, 8:39 AM Vincenzo D'Amore <v....@gmail.com> wrote:
>
> > Hi all,
> >
> > I’m using Solr (version 9.8.1) with a knn_vector field and I’d like to
> > filter for documents that *do not have* this vector field populated.
> >
> > I tried using the query:
> >
> > -my_vector:[* TO *]
> >
> > …but Solr returns the following error:
> >
> > *“Range Queries are not supported for Dense Vector fields. Please use the
> > {!knn} query parser to run K nearest neighbors search queries.”*
> >
> > Is there a supported way to filter documents that *do not have a value
> for
> > a knn_vector field* (i.e., the field is missing)?
> >
> > Any suggestions or workarounds would be appreciated.
> >
> > Thanks, Vincenzo
> >
> > --
> > Vincenzo D'Amore
> >
>
--
Vincenzo D'Amore
Re: How to filter documents missing a dense vector (knn_vector) field
Posted by Robi Petersen <ro...@gmail.com>.
-my_vector:*
On Mon, Jun 16, 2025, 8:39 AM Vincenzo D'Amore <v....@gmail.com> wrote:
> Hi all,
>
> I’m using Solr (version 9.8.1) with a knn_vector field and I’d like to
> filter for documents that *do not have* this vector field populated.
>
> I tried using the query:
>
> -my_vector:[* TO *]
>
> …but Solr returns the following error:
>
> *“Range Queries are not supported for Dense Vector fields. Please use the
> {!knn} query parser to run K nearest neighbors search queries.”*
>
> Is there a supported way to filter documents that *do not have a value for
> a knn_vector field* (i.e., the field is missing)?
>
> Any suggestions or workarounds would be appreciated.
>
> Thanks, Vincenzo
>
> --
> Vincenzo D'Amore
>
Re: How to filter documents missing a dense vector (knn_vector) field
Posted by Robi Petersen <ro...@gmail.com>.
-my_vector:*
On Mon, Jun 16, 2025, 8:39 AM Vincenzo D'Amore <v....@gmail.com> wrote:
> Hi all,
>
> I’m using Solr (version 9.8.1) with a knn_vector field and I’d like to
> filter for documents that *do not have* this vector field populated.
>
> I tried using the query:
>
> -my_vector:[* TO *]
>
> …but Solr returns the following error:
>
> *“Range Queries are not supported for Dense Vector fields. Please use the
> {!knn} query parser to run K nearest neighbors search queries.”*
>
> Is there a supported way to filter documents that *do not have a value for
> a knn_vector field* (i.e., the field is missing)?
>
> Any suggestions or workarounds would be appreciated.
>
> Thanks, Vincenzo
>
> --
> Vincenzo D'Amore
>