Skip to content

applying Sura name is not working #94

Closed

Description

@laylahammoury

Bug Description

When searching and then applying the Sura name filter, it doesn't filter the results

Steps to Reproduce

Search for ("الرحمن")
Select Sura name ("الفاتحة")
The results do not apply the Sura name filter

Expected Behavior

The results should consider the Sura name filter

Screenshots

Image

Environment Info

No response

Activity

  1. ibrahimtaha22 commented on Aug 12, 2026

    @ibrahimtaha22

    Hi, I'd like to work on this issue. Could you please assign it to me?

  2. adelpro commented on Aug 15, 2026

    @adelpro
    Owner

    What playground did you work on here, @laylahammoury?

    Also, can you take this issue, or should we pass it to @ibrahimtaha22?

  3. adelpro commented on Aug 15, 2026

    @adelpro
    Owner

    And thanks a lot for pointing out this bug, @laylahammoury. Baraka Allahu fik!

  4. laylahammoury commented on Aug 16, 2026

    @laylahammoury
    Author

    I used React Playground.
    I would like to work on it. Thanks.

  5. adelpro commented on Aug 16, 2026

    @adelpro
    Owner

    Salam @laylahammoury
    Your assessment is correct. You can start working on this bug. Please check the juz ID and surah ID.

  6. adelpro commented on Aug 16, 2026

    @adelpro
    Owner

    @ibrahimtaha22 thanks for your interest in this project, you are welcome to contribute, please check available issues or suggest a new one

  7. ibrahimtaha22 commented on Aug 16, 2026

    @ibrahimtaha22

    Thanks, @adelpro I completely understand. I will check the other open issues and see where I can contribute to the project.

  8. MalikMlitat commented on Aug 17, 2026

    @MalikMlitat

    Salam @laylahammoury, @adelpro pointed me here from #97, so some notes in case they help.

    I hit the same thing from the library side while building the CLI. The cause looks like
    filterVerses being called in only one place: inside the regex branch of
    src/core/search.ts. The linguistic path never calls it, so suraId, juzId and suraName
    are all accepted and then ignored:

    search('الله', ctx, { lemma: true, root: true, suraId: 1 }, { page: 1, limit: 3 });
    // 1880 results, first is 1:1, then 2:7 and 2:8
    // suraId: 78, juzId: 1 and juzId: 30 all give identical numbers

    The same query with isRegex: true filters correctly, which is what pointed me at the branch.

    One thing worth deciding early: filterVerses treats the three as a priority chain, suraId
    first, then suraName, then juzId, so only one ever applies. If someone passes suraId and
    juzId together, they probably expect both.

    My CLI PR narrows the corpus before calling search() as a local workaround, so it does not
    depend on this being fixed. Once your fix lands I will drop that and rely on the library.
    Nothing I am doing should collide with you, and I am not touching search.ts or
    simple-search.ts.

  9. adelpro commented on Sep 11, 2026

    @adelpro
    Owner

    Salam @laylahammoury

    Checking in since there hasn't been an update in a while. Are you still interested in this issue? If I don't hear back, I'll unassign it so someone else can pick it up.

  10. laylahammoury commented on Sep 12, 2026

    @laylahammoury
    Author

    Salam @adelpro,

    Please accept my apologies for the delay on this task.
    I'm still interested in this issue, but I haven't had the time to solve it.
    I had an unexpected personal matter to take care of and was away from my computer.

    Please assign it to someone else .

    Thank you for your patience.

  11. ibrahimtaha22 commented on Sep 12, 2026

    @ibrahimtaha22

    Salam @adelpro , I would like to work on this issue as @laylahammoury mentioned she won't be able to handle it. Could you please assign it to me? Thank you!

  12. adelpro commented on Sep 12, 2026

    @adelpro
    Owner

    Salam @adelpro,

    Please accept my apologies for the delay on this task. I'm still interested in this issue, but I haven't had the time to solve it. I had an unexpected personal matter to take care of and was away from my computer.

    Please assign it to someone else .

    Thank you for your patience.

    Thanks for you time and for your effort on this project, you re welcome t any time

    Baraka allaho fik

  13. adelpro commented on Sep 12, 2026

    @adelpro
    Owner

    Salam @adelpro , I would like to work on this issue as @laylahammoury mentioned she won't be able to handle it. Could you please assign it to me? Thank you!

    Ok @ibrahimtaha22 you can start working on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions