keyword-analyzer.asciidoc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. [[analysis-keyword-analyzer]]
  2. === Keyword Analyzer
  3. The `keyword` analyzer is a ``noop'' analyzer which returns the entire input
  4. string as a single token.
  5. [float]
  6. === Definition
  7. It consists of:
  8. Tokenizer::
  9. * <<analysis-keyword-tokenizer,Keyword Tokenizer>>
  10. [float]
  11. === Example output
  12. [source,js]
  13. ---------------------------
  14. POST _analyze
  15. {
  16. "analyzer": "keyword",
  17. "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
  18. }
  19. ---------------------------
  20. // CONSOLE
  21. /////////////////////
  22. [source,js]
  23. ----------------------------
  24. {
  25. "tokens": [
  26. {
  27. "token": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.",
  28. "start_offset": 0,
  29. "end_offset": 56,
  30. "type": "word",
  31. "position": 0
  32. }
  33. ]
  34. }
  35. ----------------------------
  36. // TESTRESPONSE
  37. /////////////////////
  38. The above sentence would produce the following single term:
  39. [source,text]
  40. ---------------------------
  41. [ The 2 QUICK Brown-Foxes jumped over the lazy dog's bone. ]
  42. ---------------------------
  43. [float]
  44. === Configuration
  45. The `keyword` analyzer is not configurable.