Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3920

Solr MoreLikeThis: slow query response and innacurate results

    Details

    • Type: Bug
    • Status: Volunteer Needed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0, 5.0, 5.5, 6.0
    • Fix Version/s: None
    • Component/s: Discovery, Solr, XMLUI
    • Labels:
      None
    • Environment:
      Linux / Dspace 5.5 / RAM: 16GB / 6 processors
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Not Required

      Description

      The query used for MoreLikeThis using the item's handle has a space character (": ")

      solrQuery.setQuery(HANDLE_FIELD + ": " + item.getHandle());
      

      link

      That space character causes a strange behaviour when simulating a query using Solr Interface (localhost:8080/dspace/solr), for example. That space is interpreted by Solr as a "+" sign in the beginning of the query. In our instance, it makes MoreLikeThis not to work properly, causing items to show very slowly and not giving correct results, especially when adding more fields to MLT (MoreLikeThis) in discovery.xml.

      In some cases, some items were taking more than 1 minute to load when verifying the query response time in Solr interface.

      After we removed that space, the problem disappeared. The items started to load quickly (milisseconds) and MLT results became accurate:

      solrQuery.setQuery(HANDLE_FIELD + ":" + item.getHandle());

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                brizzo Fabricio Costa
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: