Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12311

Suggester is not getting built on all replicas when "suggest.build=true" is issued

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • 7.3
    • None
    • Suggester
    • None

    Description

      The suggester dictionary is not getting built in all the replicas when a "suggest.build=true" is issued. It is getting built only on the replica that the first "suggest.build=true" query hits. Further queries that use the suggest component get only partial suggest results when the replicas where the dictionary is not built are hit.

      This can be reproduced with the sample "techproducts" collection,

      1. Create the "techproducts" collection with 2 shards and 2 replicas.
      2. The default suggest component "mySuggester" has "buildOnStartup"=false
      3. Send in this query to build the suggester and query it, "http://localhost:8983/solr/techproducts/suggest?suggest.build=true&suggest.dictionary=mySuggester&suggest.q=elec" . You will see 4 suggestions.
      4. Hit this query, without the "suggest.build=true" parameter multiple times and sometimes you will see 4 suggestions and in other times only 2 suggestions "http://localhost:8983/solr/techproducts/suggest?suggest.dictionary=mySuggester&suggest.q=elec"
      5. When the above query in Step 4 is sent with "distrib=false" to each of the replicas, we can see that some replicas does not return any results.
      6. When the logs are analyzed, we can see that the first time we send a query with "suggest.build=true", the suggest dictionary is built only on the replica that the distributed query hits and not the other ones.

      Expected behaviour:

      With one "suggest.build=true" query, the dictionary should be built on all replicas, so that further queries can get all the suggestions.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            kannanrang Kannan Ranganathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment