Bird
0
0

Which sequence of commands correctly achieves this?

hard📝 Application Q15 of 15
PostgreSQL - Full-Text Search
You want to create a search configuration for French that uses the built-in french configuration but replaces the stopword dictionary with a custom dictionary named my_french_stop. Which sequence of commands correctly achieves this?
ACREATE TEXT SEARCH CONFIGURATION my_french ( COPY = french ); ALTER TEXT SEARCH CONFIGURATION my_french ALTER MAPPING FOR stopword WITH my_french_stop;
BCREATE TEXT SEARCH CONFIGURATION my_french ( COPY = french ); ALTER TEXT SEARCH CONFIGURATION my_french ALTER MAPPING FOR word WITH my_french_stop;
CCREATE TEXT SEARCH CONFIGURATION my_french AS french; ALTER TEXT SEARCH CONFIGURATION my_french ALTER MAPPING FOR stopword WITH my_french_stop;
DCREATE TEXT SEARCH CONFIGURATION my_french ( COPY = french ); ALTER TEXT SEARCH CONFIGURATION my_french ALTER MAPPING FOR stopword WITH french;
Step-by-Step Solution
Solution:
  1. Step 1: Create configuration by copying french

    Use CREATE TEXT SEARCH CONFIGURATION my_french ( COPY = french ); to clone the built-in french config.
  2. Step 2: Alter mapping for stopword dictionary

    Use ALTER MAPPING FOR stopword WITH my_french_stop; to replace the stopword dictionary with the custom one.
  3. Final Answer:

    CREATE TEXT SEARCH CONFIGURATION my_french ( COPY = french ); ALTER TEXT SEARCH CONFIGURATION my_french ALTER MAPPING FOR stopword WITH my_french_stop; -> Option A
  4. Quick Check:

    Copy config then alter stopword mapping [OK]
Quick Trick: Copy config then ALTER MAPPING for custom dictionaries [OK]
Common Mistakes:
  • Using AS instead of COPY = for creation
  • Altering wrong token types like word instead of stopword
  • Assigning built-in dictionary instead of custom one

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes