Skip to content

Conversation

@hgaol
Copy link
Member

@hgaol hgaol commented Mar 26, 2025

Minor fix for #238 .

To align with search specifications for this field. Pls let me know if it's expected and I can close this PR. :p

// greater than or equal to the number of answers. Only support search question.
AnswerAmount int

https://github.com/apache/answer/blob/3b07b39d896ed755e44515ba8106d56132cc5439/plugin/search.go#L77

if cond.AnswerAmount > 0 {

@hgaol
Copy link
Member Author

hgaol commented Mar 26, 2025

The sync info CI is not happy. Not sure if there's something wrong with GITHUB_TOKEN or I missed something.

@hgaol hgaol closed this Mar 26, 2025
@hgaol hgaol reopened this Mar 26, 2025
@LinkinStars
Copy link
Member

It looks like your changes make sense. When AnswerAmount is 0, the query should actually be all of them. When it's not 0 it should be the query condition. let us ask @kumfo to confirm this.

@LinkinStars LinkinStars requested a review from kumfo March 26, 2025 15:52
@kumfo
Copy link
Member

kumfo commented Apr 3, 2025

You should not change this code, when search conditions has answers:0, the search results should not include questions that have existing answers.

When cond.AnswerAmount is -1, the search result no limit. Could you please check this code?

Copy link
Member

@kumfo kumfo left a comment

Choose a reason for hiding this comment

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

Please refer to my comments.

@hgaol hgaol closed this Apr 9, 2025
@hgaol
Copy link
Member Author

hgaol commented Apr 9, 2025

Thanks @kumfo , I closed this PR since it's by design.

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.

3 participants