Uploaded image for project: 'LLM AI Integration'
  1. LLM AI Integration
  2. LLMAI-238

Semantic search never returns more than 10 results

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0.1
    • 0.3
    • None
    • Unknown

    Description

      Problem

      A search that asks for more than 10 semantic results gets at most 10. The keyword half of the same search returns as many results as asked.

      Steps to reproduce

      1. Index a collection with more than 20 chunks.
      2. Send POST /rest/wikis/xwiki/aiLLM/search?query=<text>&collection=<name>&limitSemanticResults=20&limitKeywordResults=0.

      Result

      10 results.

      Expected

      20 results, or fewer when chunks with identical content are merged.

      Cause

      The semantic query asks Solr for the requested number of nearest neighbors but does not set the number of rows to return, so Solr applies its default of 10.

      Impact

      The REST search, the MCP search_collections tool and the chat context are affected whenever more than 10 semantic results are configured or requested.

      Attachments

        Activity

          People

            ppantiru Paul Pantiru
            ppantiru Paul Pantiru
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: