Class PhraseQuery

    • Constructor Detail

      • PhraseQuery

        public PhraseQuery​(String fieldName,
                           String text,
                           int slop,
                           AnalyzerDescriptorProvider analyzerDescriptorProvider,
                           float boost)
        Create a query which matches by phrases. Text can be analysed prior to search.
        Parameters:
        fieldName - the name of the field to query
        text - the phrase for matching on the field value
        slop - the maximum allowable edit distance of the field value to match the text
        analyzerDescriptorProvider - description of how to analyse the text before search. Remaining terms from analysis are positionally incremented by 1 in left to right order.
        boost - boost to the scores of matching documents
        Since:
        8.7
      • PhraseQuery

        public PhraseQuery​(String fieldName,
                           String text,
                           int slop,
                           AnalyzerDescriptorProvider analyzerDescriptorProvider)
        Create a query which matches by phrases. Text can be analysed prior to search.
        Parameters:
        fieldName - the name of the field to query
        text - the phrase for matching on the field value
        slop - the maximum allowable edit distance of the field value to match the text
        analyzerDescriptorProvider - description of how to analyse the text before search. Remaining terms from analysis are positionally incremented by 1 in left to right order.
      • PhraseQuery

        public PhraseQuery​(String fieldName,
                           String text,
                           int slop)
        Create a query which matches by phrases. Text is analysed by Confluence specified analysis prior to search.
        Parameters:
        fieldName - the name of the field to query
        text - the phrase for matching on the field value
        slop - the maximum allowable edit distance of the field value to match the text