You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by "hbsciw (via GitHub)" <gi...@apache.org> on 2024/01/22 10:49:51 UTC

[I] Bug Report: MeiliSearch Plugin Not Updating New Answers [incubator-answer]

hbsciw opened a new issue, #738:
URL: https://github.com/apache/incubator-answer/issues/738

   ## Bug Report: MeiliSearch Plugin Not Updating New Answers
   
   ### Description
   I am experiencing an issue where new answers are not updating in MeiliSearch when using the MeiliSearch plugin.
   
   ### Steps to Reproduce
   1. Update the answers in the system.
   2. Observe the behavior in MeiliSearch.
   
   ### Expected Behavior
   New answers should be updated in MeiliSearch.
   
   ### Actual Behavior
   New answers are not being updated in MeiliSearch.
   
   ### Debugging Information
   While debugging, I encountered an error message stating "a pointer to a pointer is not allowed" at line 417 in `answer_repo.go`. Here is a screenshot of the error:
   
   ![Error screenshot](https://github.com/apache/incubator-answer/assets/7039555/ea9357e1-59b9-4352-ae11-b8af69884c03)
   
   I suspect the issue might be related to the question instance initialization. As a workaround, I modified the initialization of the question instance, which seemed to resolve the issue temporarily. Here's the screenshot post-modification:
   
   ![Workaround screenshot](https://github.com/apache/incubator-answer/assets/7039555/6bcc3f4d-5b8a-4478-bb0e-32b71d4ff1bb)
   
   ### Question
   Is this a known bug? Can anyone confirm if the issue is indeed related to the initialization of the question instance?
   
   Any guidance or confirmation on this issue would be greatly appreciated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Bug Report: MeiliSearch Plugin Not Updating New Answers [incubator-answer]

Posted by "kumfo (via GitHub)" <gi...@apache.org>.
kumfo commented on issue #738:
URL: https://github.com/apache/incubator-answer/issues/738#issuecomment-1905178517

   @hbsciw Thanks for your feedback, you'r right. 
   
   You can commit your change to fixed this bug.
   
   // original code
   ```go
   var (
       question *entity.Question
   )
   exist, err = ar.data.DB.Context(ctx).Where("id = ?", answer.QuestionID).Get(&question)
   ```
   
   Can be modified according to your code.
   ```go
   var (
       question = new(entity.Question)
   )
   exist, err = ar.data.DB.Context(ctx).Where("id = ?", answer.QuestionID).Get(&question)
   ```
   
   or change like this:
   ``` go
   var (
       question *entity.Question
   )
   exist, err = ar.data.DB.Context(ctx).Where("id = ?", answer.QuestionID).Get(question)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Bug Report: MeiliSearch Plugin Not Updating New Answers [incubator-answer]

Posted by "fenbox (via GitHub)" <gi...@apache.org>.
fenbox closed issue #738: Bug Report: MeiliSearch Plugin Not Updating New Answers
URL: https://github.com/apache/incubator-answer/issues/738


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org