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

Tensor prefiltering not working for fields with spaces [BUG] #115

Closed
pandu-k opened this issue Oct 7, 2022 · 3 comments
Closed

Tensor prefiltering not working for fields with spaces [BUG] #115

pandu-k opened this issue Oct 7, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@pandu-k
Copy link
Collaborator

pandu-k commented Oct 7, 2022

Describe the bug
Tensor prefiltering not working for fields with spaces. When a filter is applied to a field with a space, no documents are retrieved.

To Reproduce
Steps to reproduce the behavior:

  1. Have Marqo running
  2. Index some documents. One should have a field with a space in it:
curl -XPOST  'http://localhost:8882/indexes/my-irst-ix/documents?refresh=true&device=cpu' -H 'Content-type:application/json' -d '
[ 
    {
        "Title": "Honey is a delectable food stuff", 
        "Desc" : "some boring description",
        "_id": "honey_facts_119",
        "gapped field": "wololo"
    }, {
        "Title": "Space exploration",
        "Desc": "mooooon! Space!!!!",
        "_id": "moon_fact_145"
    }
]'

Doing a filtered lexical search works (document id: "honey_facts_119" is retrieved):

curl -XPOST  'http://localhost:8882/indexes/my-irst-ix/search?device=cpu' -H 'Content-type:application/json' -d '{
    "q": "what do bears eat?",
    "searchMethod": "LEXICAL",
    "filter": "gapped\\ field:wololo"
}'

But doing a filtered tensor search doesn't (document id: "honey_facts_119" isn't retrieved):

curl -XPOST  'http://localhost:8882/indexes/my-irst-ix/search?device=cpu' -H 'Content-type:application/json' -d '{
    "q": "what do bears eat?",
    "searchMethod": "TENSOR",
    "filter": "gapped\\ field:wololo"
}'

Expected behavior
When a filter is applied to a field with a space, the documents should be retrieved, in the same way it is for lexical search

Desktop (please complete the following information):

  • OS: Ubuntu amd64
  • Version 0.0.3

Additional context
Add any other context about the problem here.

@pandu-k pandu-k added the bug Something isn't working label Oct 7, 2022
@PawanPatil19
Copy link

Can you assign this issue to me?

@pandu-k
Copy link
Collaborator Author

pandu-k commented Nov 3, 2022

Looking at this issue, I think it's a problem with Marqo-os kNN filtering having trouble parsing fields with spaces, or at least with escaping the space with a backslash.

What solution are you thinking of @PawanPatil19 ?

@pandu-k pandu-k mentioned this issue Dec 8, 2022
3 tasks
@pandu-k
Copy link
Collaborator Author

pandu-k commented Dec 13, 2022

Resolved by #213

@pandu-k pandu-k closed this as completed Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants