Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-30064

Stock solr-web does not show all matching entries

    Details

      Description

      After deploying stock solr-web and renidexing all content, I was experiencing weird behavior, that not all entries were shown in the results (ont he right in stock Search portlet). But the count on the left suggested, that there are more matching entries. For example, when searching for "Michael" with no restrictions, I got thousands or results, most from Document Library and also 114 Users, But when I restricted the search just to users, none was dispalyed, I saw just a message like "No results could be displayed". The same happened with other entries as well, but some of them showed, some not. Tested on 6.1.20 EE with solr-web 6.1.20.

      Debugging had shown that the problem is in solr-web -> SolrIndexSearcherImpl.java -> lines 327-330, the code is the same in CE solr-web:

      https://github.com/liferay/liferay-plugins/blob/master/webs/solr-web/docroot/WEB-INF/src/com/liferay/portal/search/solr/SolrIndexSearcherImpl.java

      When highlighting is on (it is on by default), non-empty snippet is required for every entry returned from Solr. But for example users have never Field.CONTENT or Field.TITLE indexed, so no snippet could be created for them and they are always excluded from resulting hits.docs.

      The snippet should not be required, I think those lines should be removed:

      327: if (Validator.isNull(snippet))

      { 328: continue; 329: }

      More details could be found on internal MB post:

      http://in.liferay.com/web/global.engineering/forums/-/message_boards/message/664026

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              james.lefeu James Lefeu (Inactive)
              Reporter:
              josef.sustacek Josef Šustáček
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 42 weeks, 4 days ago

                  Packages

                  Version Package
                  6.1.30 EE GA3
                  6.2.0 CE M4