Re: Expanding child document matches with parent fields

2024-01-27 Thread Frederic Font Corbera
Hi,

That might indeed be an alternative solution, but I prefer the current
solution as I can have multiple matches per parent document because I’m
actually matching children. If for example 3 child docs of the same parent
match the query, I wan’t to know all these matches so searching for
children is really what I want. The solutions for faceting and filtering at
the parent domain work perfect. And grouping child docs with a field from
their parents seems not to be possible, but I fix that by adding this field
to the child docs as well (even if I’m duplicating a small amount of
information).

Thanks again for the help!


frederic


--
Frederic Font - ffont.github.io
Music Technology Group, UPF - mtg.upf.edu 
Freesound - freesound.org



El dv, 26 gen. 2024 a les 20:56 Mikhail Khludnev  va
escriure:

> Hi, I don't fully follow, but I remember that there's a function for
> sorting parents by matching children
>
> https://solr.apache.org/guide/solr/latest/query-guide/function-queries.html#childfieldfield-function
> unfortunately its' vice versa stuck in implementation
> https://issues.apache.org/jira/browse/SOLR-10701
> Can you confirm that sort=parentfield() will suite for your problem?
>
> On Fri, Jan 26, 2024 at 4:01 PM Frederic Font Corbera <
> frederic.f...@upf.edu>
> wrote:
>
> > Hi,
> >
> > Thanks for your suggestion. I already tried that, but unfortunately it is
> > not what I need because it will not sort results according the the child
> > score (which I need), and also it would return only one parent even if
> > several of its children would match.
> >
> > My current solution using the domain property of the JSON facets mode and
> > duplication the grouping fields in child documents works perfectly.
> >
> > Thanks a lot for your help!
> >
> >
> > frederic
> >
> >
> > --
> > Frederic Font - ffont.github.io
> > Music Technology Group, UPF - mtg.upf.edu 
> > Freesound - freesound.org
> >
> >
> >
> > On Thu, 25 Jan 2024 at 19:31, Mikhail Khludnev  wrote:
> >
> > > Probably you are talking about searching parents and then roll over
> > parents
> > > to children via
> > >
> > >
> >
> https://solr.apache.org/guide/solr/latest/query-guide/document-transformers.html#child-childdoctransformerfactory
> > >
> > > On Thu, Jan 25, 2024 at 7:16 PM Frederic Font Corbera <
> > > frederic.f...@upf.edu>
> > > wrote:
> > >
> > > > Hi Mikhail,
> > > >
> > > > Thanks a lot for your quick response! I did not know about that and
> > this
> > > > seems to be exactly what I was looking for. I did some quick tests
> with
> > > the
> > > > JSON facets API (previously I was using the non-JSON faceting method)
> > and
> > > > it allows me to query child document but facet by parents, just as
> you
> > > > described. This is perfect for me.
> > > >
> > > > There is one extra issue that I did not mention in my previous email
> > > which
> > > > is, similar to the faceting problem which is now solved, I have a
> > > grouping
> > > > problem because I'd like to group child document by a field of the
> > > parent.
> > > > Again I could fix that by indexing the parent fields with the child
> > (and
> > > > because I only need one field it would not be too bad in this case).
> > But
> > > > maybe there is a similar solution to that of the facets? I searched
> the
> > > > docs but could not find it.
> > > >
> > > > Thanks a lot!!!
> > > >
> > > >
> > > > frederic
> > > >
> > > >
> > > > --
> > > > Frederic Font - ffont.github.io
> > > > Music Technology Group, UPF - mtg.upf.edu <
> > https://www.upf.edu/web/mtg/>
> > > > Freesound - freesound.org
> > > >
> > > >
> > > >
> > > > On Thu, 25 Jan 2024 at 13:02, Mikhail Khludnev 
> > wrote:
> > > >
> > > > > Hello Federic,
> > > > > It sounds like blockParent domain change see.
> > > > >
> > > > >
> > > >
> > >
> >
> https://solr.apache.org/guide/solr/latest/query-guide/json-faceting-domain-changes.html#block-join-domain-changes
> > > > >
> > > > > On Thu, Jan 25, 2024 at 12:15 PM Frederic Font Corbera <
> > > > > frederic.f...@upf.edu> wrote:
> > > > >
> > > > > > Hi everyone,
> > > > > >
> > > > > > I'm one of the developers behind the Freesound website (
> > > > > > https://freesound.org, a sound sharing website), we use Solr as
> > our
> > > > > search
> > > > > > engine and I'm currently experimenting with a new feature that
> I'd
> > > like
> > > > > to
> > > > > > implement using Solr. In summary, we have a Solr index with one
> > > > document
> > > > > > per sound in our database and we do standard search operations
> > there.
> > > > > > However, I'd like to add child documents to each of the main
> > > documents
> > > > > > which include specific information about the sounds at different
> > > points
> > > > > in
> > > > > > time. For example, I have a main document with basic properties
> > like
> > > > > sound
> > > > > > title and tags, but then have N child documents that have a
> > timestamp
> > > > > field
> > > > 

Dense vector search distance calculation

2024-01-27 Thread Frederic Font Corbera
Hi everyone,

I successfully added dense vector search to my Solr-based app, but I’d like
to compare the results with other nn-search solutions and for that reason
it would be good to have access to the actual distance values computer by
Solr. This does not seem to be possible and I can only access the resulting
“score”.  That score is of course related to the distance metric but I
could not find information about how this relation works. In fact, cosine
distance is, well, a distance metric (big values=dissimilar items), but the
returned score is a “similarity” metric (big values=similar items). So how
does Solr transform the distance metric to a similarity metric? Is this
documented somewhere?

Thanks a lot!

frederic


--
Frederic Font - ffont.github.io
Music Technology Group, UPF - mtg.upf.edu 
Freesound - freesound.org


Re: Dense vector search distance calculation

2024-01-27 Thread Frederic Font Corbera
Nevermind, I guess Solr computes cosine similarity and not cosine distance,
and the returned score is probably the cosine similarity value.

Cheers,

frederic


--
Frederic Font - ffont.github.io
Music Technology Group, UPF - mtg.upf.edu 
Freesound - freesound.org



El ds, 27 gen. 2024 a les 11:57 Frederic Font Corbera 
va escriure:

> Hi everyone,
>
> I successfully added dense vector search to my Solr-based app, but I’d
> like to compare the results with other nn-search solutions and for that
> reason it would be good to have access to the actual distance values
> computer by Solr. This does not seem to be possible and I can only access
> the resulting “score”.  That score is of course related to the distance
> metric but I could not find information about how this relation works. In
> fact, cosine distance is, well, a distance metric (big values=dissimilar
> items), but the returned score is a “similarity” metric (big values=similar
> items). So how does Solr transform the distance metric to a similarity
> metric? Is this documented somewhere?
>
> Thanks a lot!
>
> frederic
>
>
> --
> Frederic Font - ffont.github.io
> Music Technology Group, UPF - mtg.upf.edu 
> Freesound - freesound.org
>
>


Highlighting on non-stored text field

2024-01-27 Thread André Mourão
Hello everyone,

Is it possible to use highlighting on a non-stored solr.TextField, by
storing termVectors termPositions and termOffsets?
The main goal would be to allow for highlighting without the growth
associated with storing the fields.

Field definition:











The Term Vectors section in the Schema Options and Performance
Considerations page

describe how termVectors, termPositions and termOffsets can be used as an
alternative (although comparable in size to using "stored").
But in the Field Properties by Use Case section of the Highlighting page
,
stored is shown as required.
and the hl.fl in the highlighter usage section

mentions "These must be "stored"."

Thank you,
André Mourão


LTR model upload API issue

2024-01-27 Thread rajani m
Hi All,

   Similar to any schema APIs, I expected the LTR model upload endpoint to
distribute and make the model available across all the nodes, however it
does not. After upload, it continues to report "model not found
exception".  The model becomes available only after a collection "reload"
api is requested. Have you experienced this?

Thanks,
Rajani


Re: LTR model upload API issue

2024-01-27 Thread Ishan Chattopadhyaya
Hi Rajani,
I think the LTR models could take advantage of the File store APIs that was
built for distributed management of package files. If you file a JIRA for
it, someone can pick it up and work on it.
Thanks and regards,
Ishan

On Sat, 27 Jan, 2024, 11:03 pm rajani m,  wrote:

> Hi All,
>
>Similar to any schema APIs, I expected the LTR model upload endpoint to
> distribute and make the model available across all the nodes, however it
> does not. After upload, it continues to report "model not found
> exception".  The model becomes available only after a collection "reload"
> api is requested. Have you experienced this?
>
> Thanks,
> Rajani
>