Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-78709

Don't ignore Stop words in Label search('labelText:"a"', 'labelText:"an"', 'labelText:"the"', etc.)

    XMLWordPrintable

Details

    • 2
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Issue Summary

      In label search, stop words are ignored, like 'labelText:"a"' doesn't work correctly in English, CJK. 'labelText:"b"' or 'labelText:"aa"' works correctly.
      This problem only happens when you search with 'labelText:"a"', 'labelText:"an", 'labelText:"is"', 'labelText:"are"'(like stop words).
      So, we need to avoid using stop words in label.

      However, the label is just a label, it is used as a mark or a sign, so stop words should not be ignored when the customer uses Label search.

      This is reproducible on Data Center: yes

      Note: Confluence Search Syntax

      Limitations with exact match search
      Phrases with stop words
      Confluence ignores common words (stop words) — such as 'and', 'the', 'or', and 'it' — even if they are included within double quotes.

      Steps to Reproduce

      Step 1: Create two pages, we call "page A" and "page B".
      Step 2: Add label 'a' to the page A. And, add label 'b' to the page B.
      Step 3: Search with 'labelText:"a"' and 'labelText:"b"'

      Expected Results

      • labelText:"a"
        • The page A is on the search result.
      • labelText:"b"
        • The page B is on the search result.

      Actual Results

      • labelText:"a"
        • The page A is not on the search result.
      • labelText:"b"
        • The page B is on the search result.

      Suggest Solution

      In label search, don't ignore stop words, it is just label.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Note: Lucene query(Confluence 7.13.2) when searching

      • index: English
        • labelText:"a" => '+()'
          2022-05-09 00:20:39,545 DEBUG [http-nio-8090-exec-1] [search.v2.lucene.SearcherWithTokenAction] internalPerform Query time = 1ms, Query = +((+ConstantScore(type:attachment type:comment) +ConstantScore(container.content.type:comment container.content.type:custom container.content.type:page container.content.type:blogpost container.content.type:attachment)) ConstantScore(type:userinfo type:personalspacedesc type:space type:custom type:attachment type:comment type:spacedesc type:blogpost type:page)) +(+() +(ConstantScore(+(contentPluginKey:com.atlassian.confluence.extra.team-calendars:calendar-content-type contentPluginKey:com.atlassian.confluence.extra.team-calendars:space-calendars-view-content-type) +type:custom) ConstantScore(type:page type:userinfo type:attachment type:personalspacedesc type:blogpost type:spacedesc)))
          
        • labelText:"b" => '+labelText:b'
          2022-05-09 00:25:34,725 DEBUG [http-nio-8090-exec-9] [search.v2.lucene.SearcherWithTokenAction] internalPerform Query time = 1ms, Query = +((+ConstantScore(type:comment type:attachment) +ConstantScore(container.content.type:attachment container.content.type:page container.content.type:comment container.content.type:custom container.content.type:blogpost)) ConstantScore(type:attachment type:comment type:custom type:personalspacedesc type:space type:spacedesc type:userinfo type:blogpost type:page)) +(+labelText:b +(ConstantScore(+(contentPluginKey:com.atlassian.confluence.extra.team-calendars:calendar-content-type contentPluginKey:com.atlassian.confluence.extra.team-calendars:space-calendars-view-content-type) +type:custom) ConstantScore(type:page type:attachment type:userinfo type:blogpost type:spacedesc type:personalspacedesc)))
          
        • labelText:"c"
          2022-05-09 00:26:16,866 DEBUG [http-nio-8090-exec-9] [search.v2.lucene.SearcherWithTokenAction] internalPerform Query time = 1ms, Query = +((+ConstantScore(type:attachment type:comment) +ConstantScore(container.content.type:blogpost container.content.type:comment container.content.type:custom container.content.type:page container.content.type:attachment)) ConstantScore(type:spacedesc type:userinfo type:attachment type:page type:comment type:blogpost type:personalspacedesc type:space type:custom)) +(+labelText:c +(ConstantScore(+type:custom +(contentPluginKey:com.atlassian.confluence.extra.team-calendars:calendar-content-type contentPluginKey:com.atlassian.confluence.extra.team-calendars:space-calendars-view-content-type)) ConstantScore(type:attachment type:personalspacedesc type:userinfo type:spacedesc type:page type:blogpost)))
          
      • index: CJK
        • labelText:"a" => '+()'
          2022-05-09 00:17:18,033 DEBUG [http-nio-8090-exec-10] [search.v2.lucene.SearcherWithTokenAction] internalPerform Query time = 2ms, Query = +((+ConstantScore(type:attachment type:comment) +ConstantScore(container.content.type:comment container.content.type:custom container.content.type:blogpost container.content.type:attachment container.content.type:page)) ConstantScore(type:personalspacedesc type:blogpost type:userinfo type:custom type:page type:space type:attachment type:comment type:spacedesc)) +(+() +(ConstantScore(+type:custom +(contentPluginKey:com.atlassian.confluence.extra.team-calendars:calendar-content-type contentPluginKey:com.atlassian.confluence.extra.team-calendars:space-calendars-view-content-type)) ConstantScore(type:userinfo type:blogpost type:personalspacedesc type:spacedesc type:page type:attachment)))
          
        • labelText:"b" => '+labelText:b'
          2022-05-09 00:31:42,165 DEBUG [http-nio-8090-exec-8] [search.v2.lucene.SearcherWithTokenAction] internalPerform Query time = 5ms, Query = +((+ConstantScore(type:comment type:attachment) +ConstantScore(container.content.type:attachment container.content.type:page container.content.type:comment container.content.type:blogpost container.content.type:custom)) ConstantScore(type:attachment type:userinfo type:custom type:comment type:spacedesc type:personalspacedesc type:page type:blogpost type:space)) +(+labelText:b +(ConstantScore(+type:custom +(contentPluginKey:com.atlassian.confluence.extra.team-calendars:space-calendars-view-content-type contentPluginKey:com.atlassian.confluence.extra.team-calendars:calendar-content-type)) ConstantScore(type:blogpost type:attachment type:spacedesc type:personalspacedesc type:userinfo type:page)))
          
        • labelText:"c"
          2022-05-09 00:31:03,701 DEBUG [http-nio-8090-exec-9] [search.v2.lucene.SearcherWithTokenAction] internalPerform Query time = 16ms, Query = +((+ConstantScore(type:attachment type:comment) +ConstantScore(container.content.type:attachment container.content.type:page container.content.type:blogpost container.content.type:custom container.content.type:comment)) ConstantScore(type:comment type:userinfo type:attachment type:space type:spacedesc type:page type:blogpost type:custom type:personalspacedesc)) +(+labelText:c +(ConstantScore(+(contentPluginKey:com.atlassian.confluence.extra.team-calendars:space-calendars-view-content-type contentPluginKey:com.atlassian.confluence.extra.team-calendars:calendar-content-type) +type:custom) ConstantScore(type:blogpost type:personalspacedesc type:page type:userinfo type:attachment type:spacedesc)))
          

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ff3967e4ed5f Ryoji Takata (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: