222checklucene.mql 775 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. -- lucene索引错误验证
  2. -- 直接查cassandra:
  3. cql:
  4. select count(*) from object_test where class='/test/oo/dimension' and int_4>=100 allow filtering
  5. /**
  6. output()
  7. match("count",1)
  8. onerror(continue)
  9. **/
  10. ;
  11. -- 通过lucene查:
  12. cql:
  13. select count(*) from object_test where class='/test/oo/dimension' and
  14. expr(object_test_lucene,'{"filter":{"type":"range","field":"int_4","lower":100,"include_lower":true}}')
  15. /**
  16. output()
  17. match("count",1)
  18. onerror(continue)
  19. **/
  20. ;
  21. cql:
  22. select count(*) from object_test where
  23. expr(object_test_lucene,'{"filter":{"type":"prefix","field":"class","value":"/test/"}}')
  24. /**
  25. output()
  26. match("count",10162)
  27. onerror(continue)
  28. **/
  29. ;
  30. -- cql:
  31. -- select class,id,name from object_test where "_tokens" like '/test/%'
  32. -- /**
  33. -- output()
  34. -- **/
  35. -- ;