GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ORDER BY $score DESC hangs when combined with non-FTS WHERE predicates · Issue #3776 · ArcadeData/arcadedb

ORDER BY $score DESC hangs when combined with non-FTS WHERE predicates #3776

New issue
Copy link
New issue
Copy link
Closed
Bug
Closed
ORDER BY $score DESC hangs when combined with non-FTS WHERE predicates#3776
Bug
Copy link
Assignees
lvca
Milestone
26.4.2

Description

@invidious9000
invidious9000
opened on Apr 4, 2026
Issue body actions

Environment

  • ArcadeDB v26.4.1-SNAPSHOT (build 6964490/1775244244683/main)
  • Running on Linux 6.12.77-1-MANJARO, OpenJDK 21.0.10 (Temurin-21.0.10+7)
  • Full-text indexes created with CREATE INDEX ON Type (field) FULL_TEXT

Summary

ORDER BY $score DESC hangs indefinitely when combined with a non-FTS predicate (e.g. AND project_id = :pid) in the WHERE clause. This applies to both per-type and polymorphic supertype indexes.

Additionally, $score always returns 1.0 on polymorphic supertype indexes (per-type indexes return correct matched-term counts).

Reproduction

Works: SEARCH_INDEX as sole predicate

SELECT id, name, $score AS score FROM Decision
WHERE SEARCH_INDEX('Decision[name,rationale]', 'dispatch pipeline hivemind') = true
ORDER BY $score DESC LIMIT 3
-- Returns immediately with correct scores (3.0, 1.0, 1.0)

Hangs: SEARCH_INDEX + additional WHERE predicate

SELECT id, name, $score AS score FROM Decision
WHERE SEARCH_INDEX('Decision[name,rationale]', 'dispatch pipeline hivemind') = true
  AND project_id = 1
ORDER BY $score DESC LIMIT 3
-- Hangs indefinitely (tested 100+ seconds)

Removing ORDER BY $score DESC from the second query makes it return immediately.

Polymorphic $score always 1.0

SELECT @type, searchable_text, $score AS score FROM Searchable
WHERE SEARCH_INDEX('Searchable[searchable_text]', 'dispatch pipeline hivemind') = true
LIMIT 5
-- All results: score = 1.0 (per-type queries return correct variable scores)

Expected

ORDER BY $score DESC should work regardless of additional WHERE predicates.

Workaround

We omit ORDER BY $score DESC from all queries that include non-FTS WHERE predicates and rely on Lucene's native result ordering.

Activity

  1. invidious9000
    changed the title [-]$score returns 1.0 for all full-text search results and ORDER BY $score hangs[/-] [+]$score returns 1.0 and ORDER BY $score hangs on polymorphic supertype full-text indexes[/+] on Apr 4, 2026
  2. lvca
    self-assigned this
    on Apr 4, 2026
  3. lvca
    added the
    Bug
    issue type on Apr 4, 2026
  4. lvca
    added this to the 26.4.1 milestone on Apr 4, 2026
  5. invidious9000
    changed the title [-]$score returns 1.0 and ORDER BY $score hangs on polymorphic supertype full-text indexes[/-] [+]ORDER BY $score DESC hangs when combined with non-FTS WHERE predicates[/+] on Apr 4, 2026
  6. lvca
    added a commit that references this issue on Apr 4, 2026

    fix: $score returns 1.0 and ORDER BY $score hangs on polymorphic supe…

    6ba4725
  7. lvca commented on Apr 4, 2026

    @lvca
    lvca
    on Apr 4, 2026
    Member
    More actions

    Should be fixed now. I tried to create a test case based on your input to avoid regressions. Please let me know if works.

  8. lvca
    closed this as completedon Apr 4, 2026
  9. invidious9000 commented on Apr 4, 2026

    @invidious9000
    invidious9000
    on Apr 4, 2026
    Author
    More actions

    Should be fixed now. I tried to create a test case based on your input to avoid regressions. Please let me know if works.

    Fix works, thank you!

    Reacted by Luca Garulli
  10. gramian
    added a commit that references this issue on Apr 4, 2026

    chore(deps): bump the github-actions group with 3 updates [skip ci]

    e342818
  11. tae898
    added a commit that references this issue on Apr 7, 2026

    fix: $score returns 1.0 and ORDER BY $score hangs on polymorphic supe…

    e884801
  12. robfrank
    added a commit that references this issue on May 12, 2026

    fix: $score returns 1.0 and ORDER BY $score hangs on polymorphic supe…

    f904612
  13. tae898
    added 4 commits that reference this issue on Jun 28, 2026

    chore(deps): bump the github-actions group with 3 updates [skip ci]

    c25f333

    fix: $score returns 1.0 and ORDER BY $score hangs on polymorphic supe…

    e2241db

    fix: $score returns 1.0 and ORDER BY $score hangs on polymorphic supe…

    46503f2

    fix: $score returns 1.0 and ORDER BY $score hangs on polymorphic supe…

    a8b8d85
  14. mergify
    added a commit that references this issue on Aug 18, 2026

    chore(deps): bump the go-modules group across 1 directory with 3 upda…

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

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

No labels
No labels

Type

Bug

Projects

No projects

    Milestone

    • 26.4.2

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.