예제 #1
0
        private IReadOnlyList <string> getAnalyzedTokens(Token t, string queryStr)
        {
            if (t.Type.IsAny(TokenType.RegexBody))
            {
                return(ReadOnlyList.From(t.Value));
            }

            if (!t.Type.IsAny(TokenType.FieldValue))
            {
                return(null);
            }

            string text = !t.IsPhrase || t.IsPhraseComplex || t.PhraseHasSlop
                                ? t.Value
                                : t.GetPhraseText(queryStr);

            var result = QueryParserAnalyzer
                         .GetTokens(t.ParentField, StringEscaper.Unescape(text))
                         .Select(_ => _.Term)
                         .ToReadOnlyList();

            return(result);
        }
예제 #2
0
 private string getDisplayField(Token token) =>
 GetDisplayField(Adapter.GetActualField(token.ParentField));
예제 #3
0
 private string getDisplayField(Token token) =>
 GetDisplayField(token.ParentField ?? string.Empty);