Skip to content

search weird result (?) #666

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

Closed
domdinicola opened this issue Apr 6, 2023 · 8 comments
Closed

search weird result (?) #666

domdinicola opened this issue Apr 6, 2023 · 8 comments
Labels

Comments

@domdinicola
Copy link
Contributor

domdinicola commented Apr 6, 2023

Hi @vgrem ,

not sure if there's a regression or something I'm missing with the latest upgrade...

image

after the first query... relevant_results.Table.Rows retrieves wrong results but the relevant_results.TotalRows is correct....

    print(relevant_results.TotalRows) -->2
    print(len(relevant_results.Table.Rows)) --> 4

not sure what is wrong here... i'm getting crazy 🈂️

then if I stop the server and execute the query which was giving wrong results... it works fine

it seems it's adding the results to the query :/

@vgrem vgrem added the question label Apr 10, 2023
@domdinicola
Copy link
Contributor Author

I tried also to send a brand new context but seems the objects are summing up.

@vgrem
Copy link
Owner

vgrem commented Apr 14, 2023

@domdinicola, thanks for the insight and catching it, will try to have a look into on weekend and get back to you

@domdinicola
Copy link
Contributor Author

@vgrem any updates on this?

@vgrem
Copy link
Owner

vgrem commented Apr 19, 2023

@domdinicola, per official documentation:

TotalRows - returns the total number of results that match the conditions given in the search query

while relevant_results.Table.Rows is expected to contain the the actual amount of returned rows which might be affected by row_limit property.

Meaning relevant_results.TotalRows is expected to be greater or equal to len(relevant_results.Table.Rows)

@domdinicola
Copy link
Contributor Author

@vgrem thanks for replying... my case is the opposite
Screen Shot 2023-04-20 at 2 19 38 PM
Screen Shot 2023-04-20 at 12 48 13 PM

@vgrem vgrem added bug and removed question labels Apr 22, 2023
@vgrem
Copy link
Owner

vgrem commented Apr 22, 2023

@domdinicola, it appears to be a bug, namely ClientResult (return type) was not resetting value between calls when passing to execute_query method. Thank you for catching and reporting it!

vgrem added a commit that referenced this issue Apr 22, 2023
@vgrem
Copy link
Owner

vgrem commented Apr 22, 2023

Has been resolved in 2.4.1 version

@vgrem vgrem closed this as completed Apr 22, 2023
@domdinicola
Copy link
Contributor Author

domdinicola commented Apr 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants