801.cassdb.like.mql 886 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. -- text支持分词查询
  2. select v_varchar, v_text from /test/basic where v_text='hello'
  3. /**
  4. output()
  5. **/
  6. ;
  7. -- 不存在的分词
  8. select v_varchar, v_text from /test/basic where v_text='e'
  9. /**
  10. output()
  11. **/
  12. ;
  13. select v_varchar, v_text from /test/basic where v_text='*e*'
  14. /**
  15. output()
  16. **/
  17. ;
  18. -- lucene 对 text 类型 wildcard 的支持,分词通配
  19. select v_varchar, v_text from /test/basic where v_text='e*'
  20. /**
  21. output()
  22. **/
  23. ;
  24. select v_varchar, v_text from /test/basic where v_text='*e'
  25. /**
  26. output()
  27. **/
  28. ;
  29. select v_varchar, v_text from /test/basic where v_varchar='\*a*'
  30. /**
  31. output()
  32. count(1)
  33. **/
  34. ;
  35. select v_varchar, v_text from /test/basic2 where v_varchar='*c\*'
  36. /**
  37. output()
  38. count(1)
  39. **/
  40. ;
  41. select v_varchar, v_text from /test/basic2 where v_varchar='a*'
  42. /**
  43. output()
  44. count(0)
  45. **/
  46. ;
  47. select v_varchar, v_text from /test/basic2 where v_varchar='*a'
  48. /**
  49. output()
  50. count(0)
  51. **/
  52. ;