@@ -20,6 +20,9 @@ public record FaqConfigEntry
2020 [ JsonPropertyName ( "questions" ) ]
2121 public string [ ] Questions { get ; set ; } = [ ] ;
2222
23+ [ JsonPropertyName ( "exact_only" ) ]
24+ public bool ExactOnly { get ; set ; } = false ;
25+
2326 public FaqConfigEntry ( ) { }
2427
2528 public FaqConfigEntry ( string answer )
@@ -54,10 +57,15 @@ IEnumerable<string> questions
5457 return null ;
5558 }
5659
57- public IEnumerable < ( string title , string question , string answer ) > QaEntryEnumerator ( )
60+ public IEnumerable < ( string title , string question , string answer ) > QaEntryEnumerator (
61+ bool noExactOnly = true
62+ )
5863 {
5964 foreach ( var entry in FaqEntries )
6065 {
66+ if ( noExactOnly && entry . ExactOnly )
67+ continue ;
68+
6169 foreach ( var keyword in entry . Keywords )
6270 {
6371 yield return ( entry . Title , keyword , entry . Answer ) ;
@@ -70,10 +78,15 @@ IEnumerable<string> questions
7078 }
7179 }
7280
73- public IEnumerable < ( string title , string question , string answer ) > AnswerEntryEnumerator ( )
81+ public IEnumerable < ( string title , string question , string answer ) > AnswerEntryEnumerator (
82+ bool noExactOnly = true
83+ )
7484 {
7585 foreach ( var entry in FaqEntries )
7686 {
87+ if ( noExactOnly && entry . ExactOnly )
88+ continue ;
89+
7790 // If we want to use an example question:
7891 // entry.Questions.FirstOrDefault(entry.Title)
7992 yield return ( entry . Title , "" , entry . Answer ) ;
0 commit comments