Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost tensor fields #300

Merged
merged 15 commits into from
Feb 10, 2023
Merged

Boost tensor fields #300

merged 15 commits into from
Feb 10, 2023

Conversation

pandu-k
Copy link
Collaborator

@pandu-k pandu-k commented Feb 1, 2023

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Feature

  • What is the current behavior? (You can also link to an open issue here)
    No way to boost/anti-boost fields

  • What is the new behavior (if this is a feature change)?
    Now a way to boost fields relative to eachother, during search

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    no

  • Have unit tests been run against this PR? (Has there also been any additional testing?)
    In progress

  • Related Python client changes (link commit/PR here)
    TODO

  • Related documentation changes (link commit/PR here)
    Boost: https://gh-previews.marqo.pages.dev/0.0.13/API-Reference/search/#boost

  • Other information:

  • Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added / updated (for bug fixes / features)

from tests.marqo_test import MarqoTestCase


class TestBoostFieldScores(MarqoTestCase):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we test with more documents (10 or so) with varying fields, with varying other params (like pagination)?

@pandu-k pandu-k changed the title Re weight search Boost tensor fields Feb 9, 2023
@pandu-k pandu-k marked this pull request as ready for review February 9, 2023 07:28
@pandu-k pandu-k temporarily deployed to marqo-test-suite February 9, 2023 07:29 — with GitHub Actions Inactive
@wanliAlex
Copy link
Collaborator

wanliAlex commented Feb 10, 2023

image

pagination, use [1,1] as boost dic for both fields.

@wanliAlex
Copy link
Collaborator

Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 1
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 2
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 3
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 4
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 5
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 6
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 7
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 8
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 9
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 10
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 11
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 12
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 13
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 14
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 15
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 16
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 17
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 18
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
Description
before boost:0.7821903
after boost:1.7821903
Title
before boost:0.9306991
after boost:1.9306991
DELETNE to be bootsed
Number of doc 19

different number of docs

@wanliAlex
Copy link
Collaborator

Title
before boost:0.9306991
after boost:1.9306991
void_field_3
before boost:0.49232623
after boost:1.49232623
Description
before boost:0.7821903
after boost:1.7821903
void_field_8
before boost:0.48269674
after boost:1.48269674
void_field_6
before boost:0.4840921
after boost:1.4840921
void_field_1
before boost:0.48407263
after boost:1.48407263
void_field_5
before boost:0.48731607
after boost:1.4873160699999999
void_field_4
before boost:0.4855699
after boost:1.4855699
void_field_7
before boost:0.4828252
after boost:1.4828252

different number of fields, use boost [1,1]

@wanliAlex
Copy link
Collaborator

void_field_1
before boost:0.48407263
after boost:-1.48407263
void_field_5
before boost:0.48731607
after boost:-1.4873160699999999
void_field_7
before boost:0.4828252
after boost:-1.4828252
void_field_6
before boost:0.4840921
after boost:-1.4840921
void_field_8
before boost:0.48269674
after boost:-1.48269674
void_field_2
before boost:0.48322064
after boost:-1.4832206399999999
Title
before boost:0.9306991
after boost:0.0
Description
before boost:0.7821903
after boost:1.7821903
void_field_3
before boost:0.49232623
after boost:-1.49232623
void_field_4
before boost:0.4855699
after boost:-1.4855699
void_field_1
before boost:0.48407263
after boost:-1.48407263
void_field_5
before boost:0.48731607
after boost:-1.4873160699999999
void_field_7
before boost:0.4828252
after boost:-1.4828252
void_field_6
before boost:0.4840921
after boost:-1.4840921
void_field_8
before boost:0.48269674
after boost:-1.48269674
void_field_2
before boost:0.48322064
after boost:-1.4832206399999999
Title
before boost:0.9306991
after boost:0.0
Description
before boost:0.7821903
after boost:1.7821903

title [0,0], description[1,1], void_field[-1,-1]

@wanliAlex
Copy link
Collaborator

Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
DELETNE to be bootsed
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
DELETNE to be bootsed
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
DELETNE to be bootsed
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
DELETNE to be bootsed
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
DELETNE to be bootsed
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
DELETNE to be bootsed
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
Description
before boost:0.7821903
after boost:4.5643806
Title
before boost:0.9306991
after boost:-4.7920973
DELETNE to be boosted

title: [-3,-2], description [2,3]

@pandu-k pandu-k merged commit 0a0cea4 into mainline Feb 10, 2023
@pandu-k pandu-k deleted the re-weight-search branch February 10, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants