IndexOptions.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package org.es.mapping.annotations.enums;
  2. public enum IndexOptions {
  3. Default {
  4. @Override
  5. public String code() {
  6. return "none";
  7. }
  8. },
  9. /**
  10. * Only the doc number is indexed. Can answer the question Does this term exist in this field?
  11. */
  12. Docs {
  13. @Override
  14. public String code() {
  15. return "docs";
  16. }
  17. },
  18. /**
  19. * Doc number and term frequencies are indexed.
  20. * Term frequencies are used to score repeated terms higher than single terms.
  21. */
  22. Freqs {
  23. @Override
  24. public String code() {
  25. return "freqs";
  26. }
  27. },
  28. /**
  29. * Doc number, term frequencies, and term positions (or order) are indexed.
  30. * Positions can be used for proximity or phrase queries.
  31. */
  32. Positions {
  33. @Override
  34. public String code() {
  35. return "positions";
  36. }
  37. },
  38. /**
  39. * Doc number, term frequencies, positions,
  40. * and start and end character offsets (which map the term back to the original string) are indexed.
  41. * Offsets are used by the postings highlighter.
  42. */
  43. Offsets {
  44. @Override
  45. public String code() {
  46. return "offsets";
  47. }
  48. };
  49. public abstract String code();
  50. }