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

Pre Filter in a deep level Query should be honored same as the top level Query

    Details

      Description

      Add a Pre Filter to a deep level query added via SearchContext, instead of the top level Query.

      Query query = new MatchAllQuery();
      
      query.setPreBooleanFilter(new TermFilter("field", "value"));
      
      SearchContext searchContext = new SearchContext();
      
      searchContext.setBooleanClauses(
          new BooleanClause[] {
             new BooleanClauseImpl(query, BooleanClauseOccur.MUST)
          });
      
      indexSearcherHelper.search(searchContext, new MatchAllQuery());

      Expected: the Pre Filter portion is rendered as part of the query sent to the search engine.

      Observed: the Pre Filter portion is missing from the query sent to the search engine.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  23 weeks, 3 days ago

                  Packages

                  Version Package
                  7.2.0 GA1