@sitevision/api 2.0.0-alpha.1 → 2023.2.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/client/requester/index.d.ts +10 -8
  2. package/client/toasts/index.d.ts +7 -5
  3. package/common/app/index.d.ts +45 -46
  4. package/common/events/index.d.ts +30 -31
  5. package/common/i18n/index.d.ts +7 -5
  6. package/common/router/index.d.ts +72 -77
  7. package/common/security/index.d.ts +27 -21
  8. package/index.d.ts +8 -0
  9. package/package.json +1 -1
  10. package/server/AliasUtil/index.d.ts +11 -9
  11. package/server/ArchiveUtil/index.d.ts +43 -41
  12. package/server/ArraysInstance/index.d.ts +1666 -1807
  13. package/server/ArticleUtil/index.d.ts +292 -224
  14. package/server/AuthenticationUtil/index.d.ts +72 -84
  15. package/server/BookmarkUtil/index.d.ts +74 -79
  16. package/server/BuddyIconRenderer/index.d.ts +123 -131
  17. package/server/BuddyIconRenderer.BuddyIconSize/index.d.ts +41 -0
  18. package/server/BuddyIconRenderer.BuddyIconSize/index.js +25 -0
  19. package/server/ClientUtil/index.d.ts +10 -8
  20. package/server/CollaborationFactory/index.d.ts +37 -40
  21. package/server/CollaborationGroupFolderUtil/index.d.ts +28 -26
  22. package/server/CollaborationGroupState/index.d.ts +27 -0
  23. package/server/CollaborationGroupState/index.js +11 -0
  24. package/server/CollaborationGroupTemplateUtil/index.d.ts +46 -48
  25. package/server/CollaborationGroupType/index.d.ts +28 -0
  26. package/server/CollaborationGroupType/index.js +12 -0
  27. package/server/CollaborationGroupUtil/index.d.ts +84 -80
  28. package/server/CollectionsInstance/index.d.ts +641 -704
  29. package/server/ColorUtil/index.d.ts +34 -35
  30. package/server/CompoundAndFilterBuilder/index.d.ts +28 -26
  31. package/server/CompoundComparatorBuilder/index.d.ts +33 -31
  32. package/server/CompoundOrFilterBuilder/index.d.ts +28 -26
  33. package/server/ContentNodeUtil/index.d.ts +34 -32
  34. package/server/CurrencyFactory/index.d.ts +70 -68
  35. package/server/DateUtil/index.d.ts +131 -141
  36. package/server/DecorationUtil/index.d.ts +11 -9
  37. package/server/DeviceUtil/index.d.ts +19 -17
  38. package/server/DimensionMode/index.d.ts +17 -0
  39. package/server/DimensionMode/index.js +12 -0
  40. package/server/DirectoryUtil/index.d.ts +87 -85
  41. package/server/DocType/index.d.ts +30 -0
  42. package/server/DocType/index.js +14 -0
  43. package/server/DocTypeUtil/index.d.ts +127 -133
  44. package/server/EndecUtil/index.d.ts +329 -346
  45. package/server/ExtendedDismaxParserBuilder/index.d.ts +153 -167
  46. package/server/FileIconRenderer/index.d.ts +152 -171
  47. package/server/FileUtil/index.d.ts +272 -298
  48. package/server/FilterBuilder/index.d.ts +39 -37
  49. package/server/FolderUtil/index.d.ts +91 -92
  50. package/server/FontUtil/index.d.ts +34 -35
  51. package/server/FormatterBuilderFactory/index.d.ts +73 -81
  52. package/server/HighlightBuilder/index.d.ts +76 -83
  53. package/server/IconUtil/index.d.ts +25 -23
  54. package/server/ImageLinkRenderer/index.d.ts +35 -33
  55. package/server/ImageRenderer/index.d.ts +340 -376
  56. package/server/ImageUtil/index.d.ts +245 -263
  57. package/server/IndexUtil/index.d.ts +38 -35
  58. package/server/IndexUtil.IndexType/index.d.ts +29 -0
  59. package/server/IndexUtil.IndexType/index.js +13 -0
  60. package/server/IndexingUtil/index.d.ts +67 -45
  61. package/server/InstanceCreatorUtil/index.d.ts +423 -459
  62. package/server/InstanceTypeUtil/index.d.ts +167 -188
  63. package/server/JwtUtil/index.d.ts +129 -127
  64. package/server/LandingPageUtil/index.d.ts +82 -85
  65. package/server/LandingPageUtil/index.js +1 -0
  66. package/server/LinkPageUtil/index.d.ts +294 -248
  67. package/server/LinkRenderer/index.d.ts +649 -713
  68. package/server/LinkTargetBuilder/index.d.ts +65 -73
  69. package/server/LinkValueBuilder/index.d.ts +66 -73
  70. package/server/ListWrapper/index.d.ts +80 -89
  71. package/server/LocaleUtil/index.d.ts +381 -393
  72. package/server/LogUtil/index.d.ts +118 -127
  73. package/server/MailBuilder/index.d.ts +106 -121
  74. package/server/MailUtil/index.d.ts +58 -63
  75. package/server/MathInstance/index.d.ts +624 -656
  76. package/server/MessageDigesterFactory/index.d.ts +28 -26
  77. package/server/MetadataDefinitionUtil/index.d.ts +77 -81
  78. package/server/MetadataUtil/index.d.ts +321 -345
  79. package/server/MimeTypeUtil/index.d.ts +208 -214
  80. package/server/MonitorBuilder/index.d.ts +17 -17
  81. package/server/NodeComparatorUtil/index.d.ts +214 -224
  82. package/server/NodeFactoryUtil/index.d.ts +19 -17
  83. package/server/NodeFilterUtil/index.d.ts +651 -738
  84. package/server/NodeIteratorUtil/index.d.ts +209 -224
  85. package/server/NodeResolverUtil/index.d.ts +398 -404
  86. package/server/NodeTreeUtil/index.d.ts +211 -226
  87. package/server/NodeTypeUtil/index.d.ts +1430 -546
  88. package/server/OfflineVersionPropertyUtil/index.d.ts +6 -4
  89. package/server/OnlineVersionPropertyUtil/index.d.ts +6 -4
  90. package/server/OutputUtil/index.d.ts +384 -379
  91. package/server/PageUtil/index.d.ts +264 -186
  92. package/server/PermissionUtil/index.d.ts +391 -428
  93. package/server/PermissionUtil.Permission/index.d.ts +54 -0
  94. package/server/PermissionUtil.Permission/index.js +38 -0
  95. package/server/PortletContextUtil/index.d.ts +111 -106
  96. package/server/PortletUtil/index.d.ts +30 -20
  97. package/server/PrincipalUtil/index.d.ts +33 -31
  98. package/server/Properties/index.d.ts +68 -75
  99. package/server/PropertyUtil/index.d.ts +1419 -1461
  100. package/server/PublishingUtil/index.d.ts +246 -247
  101. package/server/QueryStringUtil/index.d.ts +403 -414
  102. package/server/RedirectUtil/index.d.ts +62 -66
  103. package/server/RelatedValueBuilder/index.d.ts +40 -38
  104. package/server/Requester/index.d.ts +123 -123
  105. package/server/ResourceLocatorUtil/index.d.ts +434 -474
  106. package/server/RestApi/index.d.ts +156 -136
  107. package/server/RestAppInvokerFactory/index.d.ts +25 -23
  108. package/server/RoleAssignmentBuilder/index.d.ts +35 -33
  109. package/server/RoleMatcherBuilder/index.d.ts +35 -33
  110. package/server/RoleUtil/index.d.ts +35 -37
  111. package/server/ScriptUtil/index.d.ts +457 -494
  112. package/server/SearchFactory/index.d.ts +102 -117
  113. package/server/SearchUtil/index.d.ts +73 -71
  114. package/server/SearcherBuilder/index.d.ts +107 -114
  115. package/server/Session/index.d.ts +251 -1093
  116. package/server/Session/index.js +1 -20
  117. package/server/SimpleUserUtil/index.d.ts +26 -27
  118. package/server/SiteCookieUtil/index.d.ts +150 -173
  119. package/server/SortBuilder/index.d.ts +24 -22
  120. package/server/SourceSetMode/index.d.ts +12 -0
  121. package/server/SourceSetMode/index.js +12 -0
  122. package/server/SpellCheckBuilder/index.d.ts +27 -27
  123. package/server/StandardParserBuilder/index.d.ts +33 -31
  124. package/server/StructureUtil/index.d.ts +83 -81
  125. package/server/SubscriberUtil/index.d.ts +58 -65
  126. package/server/SubscriptionUtil/index.d.ts +121 -128
  127. package/server/SystemUserUtil/index.d.ts +146 -144
  128. package/server/TagUtil/index.d.ts +113 -118
  129. package/server/TemplateUtil/index.d.ts +113 -118
  130. package/server/TemporaryFileNodeBuilder/index.d.ts +29 -27
  131. package/server/TemporaryNodeBuilder/index.d.ts +136 -174
  132. package/server/TextModuleRendererBuilder/index.d.ts +18 -16
  133. package/server/TimestampUtil/index.d.ts +102 -116
  134. package/server/TranslationUtil/index.d.ts +96 -102
  135. package/server/TrashcanUtil/index.d.ts +112 -115
  136. package/server/UserDataUtil/index.d.ts +108 -109
  137. package/server/UserFactory/index.d.ts +49 -56
  138. package/server/UserFieldRenderer/index.d.ts +118 -126
  139. package/server/UserIdentityUtil/index.d.ts +36 -34
  140. package/server/UserUtil/index.d.ts +30 -28
  141. package/server/Utils/index.d.ts +702 -791
  142. package/server/VelocityRenderer/index.d.ts +94 -92
  143. package/server/VersionUtil/index.d.ts +24 -8
  144. package/server/WebContentUtil/index.d.ts +275 -282
  145. package/server/WebResourceFactory/index.d.ts +46 -51
  146. package/server/XSLTUtil/index.d.ts +33 -31
  147. package/server/XmlParserUtil/index.d.ts +47 -45
  148. package/server/appData/index.d.ts +8 -6
  149. package/server/appInfo/index.d.ts +6 -2
  150. package/server/appResource/index.d.ts +23 -21
  151. package/server/cache/index.d.ts +8 -6
  152. package/server/globalAppData/index.d.ts +8 -6
  153. package/server/headless/index.d.ts +28 -26
  154. package/server/hooks/index.d.ts +9 -9
  155. package/server/oauth2/index.d.ts +12 -10
  156. package/server/privileged/index.d.ts +24 -22
  157. package/server/storage/index.d.ts +22 -20
  158. package/types/javax/jcr/Binary/index.d.ts +0 -20
  159. package/types/javax/jcr/Binary/index.js +0 -1
  160. package/types/javax/jcr/ImportUUIDBehavior/index.d.ts +24 -0
  161. package/types/javax/jcr/Item/index.d.ts +1 -116
  162. package/types/javax/jcr/Item/index.js +0 -6
  163. package/types/javax/jcr/NamespaceRegistry/index.d.ts +66 -42
  164. package/types/javax/jcr/NamespaceRegistry/index.js +0 -2
  165. package/types/javax/jcr/Node/index.d.ts +24 -1495
  166. package/types/javax/jcr/Node/index.js +1 -34
  167. package/types/javax/jcr/NodeIterator/index.d.ts +1 -1
  168. package/types/javax/jcr/Property/index.d.ts +487 -489
  169. package/types/javax/jcr/Property/index.js +0 -5
  170. package/types/javax/jcr/PropertyIterator/index.d.ts +1 -1
  171. package/types/javax/jcr/RangeIterator/index.d.ts +1 -43
  172. package/types/javax/jcr/RangeIterator/index.js +1 -5
  173. package/types/javax/jcr/Repository/index.d.ts +460 -260
  174. package/types/javax/jcr/Repository/index.js +0 -4
  175. package/types/javax/jcr/Value/index.d.ts +0 -29
  176. package/types/javax/jcr/Value/index.js +0 -2
  177. package/types/javax/jcr/ValueFactory/index.d.ts +0 -70
  178. package/types/javax/jcr/ValueFactory/index.js +1 -2
  179. package/types/javax/jcr/Workspace/index.d.ts +93 -569
  180. package/types/javax/jcr/Workspace/index.js +1 -12
  181. package/types/javax/jcr/nodetype/ItemDefinition/index.d.ts +0 -103
  182. package/types/javax/jcr/nodetype/ItemDefinition/index.js +0 -5
  183. package/types/javax/jcr/nodetype/NodeDefinition/index.d.ts +1 -1
  184. package/types/javax/jcr/nodetype/NodeDefinitionTemplate/index.d.ts +1 -1
  185. package/types/javax/jcr/nodetype/NodeType/index.d.ts +255 -264
  186. package/types/javax/jcr/nodetype/NodeType/index.js +1 -12
  187. package/types/javax/jcr/nodetype/NodeTypeDefinition/index.d.ts +0 -104
  188. package/types/javax/jcr/nodetype/NodeTypeDefinition/index.js +1 -7
  189. package/types/javax/jcr/nodetype/NodeTypeIterator/index.d.ts +1 -1
  190. package/types/javax/jcr/nodetype/NodeTypeManager/index.d.ts +0 -123
  191. package/types/javax/jcr/nodetype/NodeTypeManager/index.js +1 -8
  192. package/types/javax/jcr/nodetype/NodeTypeTemplate/index.d.ts +1 -1
  193. package/types/javax/jcr/nodetype/PropertyDefinition/index.d.ts +1 -270
  194. package/types/javax/jcr/nodetype/PropertyDefinition/index.js +1 -7
  195. package/types/javax/jcr/nodetype/PropertyDefinitionTemplate/index.d.ts +1 -1
  196. package/types/javax/jcr/observation/Event/index.d.ts +82 -41
  197. package/types/javax/jcr/observation/EventIterator/index.d.ts +1 -1
  198. package/types/javax/jcr/observation/EventJournal/index.d.ts +1 -1
  199. package/types/javax/jcr/observation/EventListenerIterator/index.d.ts +1 -1
  200. package/types/javax/jcr/query/Query/index.d.ts +29 -8
  201. package/types/javax/jcr/query/RowIterator/index.d.ts +1 -1
  202. package/types/javax/jcr/query/qom/And/index.d.ts +1 -1
  203. package/types/javax/jcr/query/qom/BindVariableValue/index.d.ts +1 -1
  204. package/types/javax/jcr/query/qom/ChildNode/index.d.ts +1 -1
  205. package/types/javax/jcr/query/qom/ChildNodeJoinCondition/index.d.ts +1 -1
  206. package/types/javax/jcr/query/qom/Comparison/index.d.ts +1 -1
  207. package/types/javax/jcr/query/qom/DescendantNode/index.d.ts +1 -1
  208. package/types/javax/jcr/query/qom/DescendantNodeJoinCondition/index.d.ts +1 -1
  209. package/types/javax/jcr/query/qom/DynamicOperand/index.d.ts +1 -1
  210. package/types/javax/jcr/query/qom/EquiJoinCondition/index.d.ts +1 -1
  211. package/types/javax/jcr/query/qom/FullTextSearch/index.d.ts +1 -1
  212. package/types/javax/jcr/query/qom/FullTextSearchScore/index.d.ts +1 -1
  213. package/types/javax/jcr/query/qom/Join/index.d.ts +1 -1
  214. package/types/javax/jcr/query/qom/Length/index.d.ts +1 -1
  215. package/types/javax/jcr/query/qom/Literal/index.d.ts +1 -1
  216. package/types/javax/jcr/query/qom/LowerCase/index.d.ts +1 -1
  217. package/types/javax/jcr/query/qom/NodeLocalName/index.d.ts +1 -1
  218. package/types/javax/jcr/query/qom/NodeName/index.d.ts +1 -1
  219. package/types/javax/jcr/query/qom/Not/index.d.ts +1 -1
  220. package/types/javax/jcr/query/qom/Or/index.d.ts +1 -1
  221. package/types/javax/jcr/query/qom/PropertyExistence/index.d.ts +1 -1
  222. package/types/javax/jcr/query/qom/PropertyValue/index.d.ts +1 -1
  223. package/types/javax/jcr/query/qom/QueryObjectModel/index.d.ts +1 -1
  224. package/types/javax/jcr/query/qom/QueryObjectModelConstants/index.d.ts +73 -1
  225. package/types/javax/jcr/query/qom/QueryObjectModelFactory/index.d.ts +1 -1
  226. package/types/javax/jcr/query/qom/SameNode/index.d.ts +1 -1
  227. package/types/javax/jcr/query/qom/SameNodeJoinCondition/index.d.ts +1 -1
  228. package/types/javax/jcr/query/qom/Selector/index.d.ts +1 -1
  229. package/types/javax/jcr/query/qom/StaticOperand/index.d.ts +1 -1
  230. package/types/javax/jcr/query/qom/UpperCase/index.d.ts +1 -1
  231. package/types/javax/jcr/security/AccessControlList/index.d.ts +1 -1
  232. package/types/javax/jcr/security/AccessControlPolicyIterator/index.d.ts +1 -1
  233. package/types/javax/jcr/security/NamedAccessControlPolicy/index.d.ts +1 -1
  234. package/types/javax/jcr/security/Privilege/index.d.ts +127 -43
  235. package/types/javax/jcr/version/Version/index.d.ts +1 -1
  236. package/types/javax/jcr/version/VersionHistory/index.d.ts +1 -1
  237. package/types/javax/jcr/version/VersionIterator/index.d.ts +1 -1
  238. package/types/senselogic/sitevision/api/base/Requireable/ScriptEngine/index.d.ts +9 -0
  239. package/types/senselogic/sitevision/api/base/Requireable/ScriptEngine/index.js +11 -0
  240. package/types/senselogic/sitevision/api/collaboration/CollaborationGroupWrapper/index.d.ts +9 -5
  241. package/types/senselogic/sitevision/api/format/NumericFormatterBuilder/index.d.ts +1 -1
  242. package/types/senselogic/sitevision/api/link/CustomLinkProcessor/index.d.ts +1 -1
  243. package/types/senselogic/sitevision/api/render/BuddyIconRenderer.BuddyIconInfo/index.d.ts +49 -0
  244. package/types/senselogic/sitevision/api/render/BuddyIconRenderer.BuddyIconInfo/index.js +12 -0
  245. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ArticleUtilConstants/index.d.ts +83 -0
  246. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ArticleUtilConstants/index.js +21 -0
  247. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ExceptionSuppressingProxyConstants/index.d.ts +29 -0
  248. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ExceptionSuppressingProxyConstants/index.js +12 -0
  249. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.IndexingUtilConstants/index.d.ts +29 -0
  250. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.IndexingUtilConstants/index.js +12 -0
  251. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.LinkPageUtilConstants/index.d.ts +65 -0
  252. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.LinkPageUtilConstants/index.js +18 -0
  253. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MathInstanceConstants/index.d.ts +23 -0
  254. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MathInstanceConstants/index.js +11 -0
  255. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MimeTypeUtilConstants/index.d.ts +17 -0
  256. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MimeTypeUtilConstants/index.js +10 -0
  257. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.NodeTypeUtilConstants/index.d.ts +1241 -0
  258. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.NodeTypeUtilConstants/index.js +189 -0
  259. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.OutputUtilConstants/index.d.ts +29 -0
  260. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.OutputUtilConstants/index.js +12 -0
  261. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PageUtilConstants/index.d.ts +89 -0
  262. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PageUtilConstants/index.js +22 -0
  263. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletContextUtilConstants/index.d.ts +25 -0
  264. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletContextUtilConstants/index.js +11 -0
  265. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletUtilConstants/index.d.ts +17 -0
  266. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletUtilConstants/index.js +10 -0
  267. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.QueryStringUtilConstants/index.d.ts +17 -0
  268. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.QueryStringUtilConstants/index.js +10 -0
  269. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchHitConstants/index.d.ts +23 -0
  270. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchHitConstants/index.js +11 -0
  271. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchResultConstants/index.d.ts +35 -0
  272. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchResultConstants/index.js +13 -0
  273. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.VersionUtilConstants/index.d.ts +23 -0
  274. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.VersionUtilConstants/index.js +11 -0
  275. package/types/senselogic/sitevision/api/script/RequesterChainable/index.d.ts +2 -2
  276. package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingProxy/index.d.ts +22 -2
  277. package/types/senselogic/sitevision/api/search/SearchHit/index.d.ts +16 -2
  278. package/types/senselogic/sitevision/api/search/SearchResult/index.d.ts +28 -6
  279. package/types/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilter/index.d.ts +31 -1
  280. package/types/senselogic/sitevision/api/user/UserIdentityWrapper/index.d.ts +1 -1
@@ -1,431 +1,420 @@
1
1
  /**
2
- * Strips all trailing "any" chars.
2
+ * Query string utility interface.
3
3
  *
4
4
  * <p>
5
- * The question mark character is a query syntax char (the "any" char) and can potentially screw up querying
6
- * <em>(i.e. the parser fails to parse the query or return unexpected result)</em>.
7
- * This method removes all trailing "any" chars (i.e. removes all trailing question marks).
5
+ * An instance of the Sitevision class implementing this interface can be obtained via
6
+ * {@link senselogic.sitevision.api.search.SearchFactory#getQueryStringUtil()}.
7
+ * See {@link senselogic.sitevision.api.search.SearchFactory} for how to obtain
8
+ * an instance of the <code>SearchFactory</code> interface.
8
9
  * </p>
9
- *
10
- * <table style="border:1px solid black" summary="">
11
- * <caption style="text-align:left">Some examples</caption>
12
- * <tr>
13
- * <th>aQueryString</th><th>Returned</th>
14
- * </tr>
15
- * <tr>
16
- * <td><code>"when is halloween"</code></td><td><code>"when is halloween"</code></td>
17
- * </tr>
18
- * <tr>
19
- * <td><code>"when is halloween?"</code></td><td><code>"when is halloween"</code></td>
20
- * </tr>
21
- * <tr>
22
- * <td><code>"when is halloween??"</code></td><td><code>"when is halloween"</code></td>
23
- * </tr>
24
- * </table>
25
- * @param aQueryString the query string
26
- * @return aQueryString without trailing any chars or null if aQueryString is null
27
- * @since Sitevision 8.2
10
+ * @author Magnus Lövgren
11
+ * @since Sitevision 3.6
28
12
  */
29
- export function stripTrailingAnyChars(aQueryString: string): string;
13
+ export interface QueryStringUtil {
14
+ /**
15
+ * The "match all" query string.
16
+ *
17
+ * <p>
18
+ * This is the special query syntax (<code>"*:*"</code>) to use when querying "everything".
19
+ * </p>
20
+ * <p>
21
+ * <em>
22
+ * A common misunderstanding is that a single wildcard (i.e. <code>"*"</code>) would also query "everything". That is a false assumption.
23
+ * A single wildcard is less efficient and it will only match docs that has data in the default query fields of the parser (i.e.
24
+ * a single wildcard will potentially not include "everything").
25
+ * </em>
26
+ * </p>
27
+ * @since Sitevision 8.2
28
+ */
29
+ MATCH_ALL_QUERY: "*:*";
30
30
 
31
- /**
32
- * Strips Local params for a query string.
33
- *
34
- * <p>
35
- * Local params are a query string prefix that starts with "<code>{!</code>" and ends with "<code>}</code>".
36
- * The Local Params can override/sidestep or affect desired search behaviour. This method strips Local params to prohibit that.
37
- * Leading whitespace of Local params will also be stripped.
38
- * </p>
39
- * <table style="border:1px solid black" summary="">
40
- * <caption style="text-align:left">Some examples</caption>
41
- * <tr>
42
- * <th>aQueryString</th><th>Returned</th>
43
- * </tr>
44
- * <tr>
45
- * <td><code>null</code></td><td><code>null</code></td>
46
- * </tr>
47
- * <tr>
48
- * <td><code>""</code></td><td><code>""</code></td>
49
- * </tr>
50
- * <tr>
51
- * <td><code>"hello query"</code></td><td><code>"hello query"</code></td>
52
- * </tr>
53
- * <tr>
54
- * <td><code>"{!}"</code></td><td><code>""</code></td>
55
- * </tr>
56
- * <tr>
57
- * <td><code>"{!}hey"</code></td><td><code>"hey"</code></td>
58
- * </tr>
59
- * <tr>
60
- * <td><code>"{!whatever}foo"</code></td><td><code>"foo"</code></td>
61
- * </tr>
62
- * <tr>
63
- * <td><code>"{!whatever} bar"</code></td><td><code>" bar"</code></td>
64
- * </tr>
65
- * <tr>
66
- * <td><code>" {! whatever }baz"</code></td><td><code>"baz"</code></td>
67
- * </tr>
68
- * <tr>
69
- * <td><code>"{!whatever"</code></td><td><code>"{!whatever"</code></td>
70
- * </tr>
71
- * </table>
72
- * @param aQueryString the query string
73
- * @return aQueryString without any Local params
74
- * @since Sitevision 10
75
- */
76
- export function stripLocalParams(aQueryString: string): string;
31
+ /**
32
+ * Strips all trailing "any" chars.
33
+ *
34
+ * <p>
35
+ * The question mark character is a query syntax char (the "any" char) and can potentially screw up querying
36
+ * <em>(i.e. the parser fails to parse the query or return unexpected result)</em>.
37
+ * This method removes all trailing "any" chars (i.e. removes all trailing question marks).
38
+ * </p>
39
+ *
40
+ * <table style="border:1px solid black" summary="">
41
+ * <caption style="text-align:left">Some examples</caption>
42
+ * <tr>
43
+ * <th>aQueryString</th><th>Returned</th>
44
+ * </tr>
45
+ * <tr>
46
+ * <td><code>"when is halloween"</code></td><td><code>"when is halloween"</code></td>
47
+ * </tr>
48
+ * <tr>
49
+ * <td><code>"when is halloween?"</code></td><td><code>"when is halloween"</code></td>
50
+ * </tr>
51
+ * <tr>
52
+ * <td><code>"when is halloween??"</code></td><td><code>"when is halloween"</code></td>
53
+ * </tr>
54
+ * </table>
55
+ * @param aQueryString the query string
56
+ * @return aQueryString without trailing any chars or null if aQueryString is null
57
+ * @since Sitevision 8.2
58
+ */
59
+ stripTrailingAnyChars(aQueryString: string): string;
77
60
 
78
- /**
79
- * Removes all query syntax characters from a query string and trims the result.
80
- *
81
- * <p>
82
- * Current query syntax characters are:<br>
83
- * <code>+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \</code><br>
84
- * </p>
85
- *
86
- * <p>
87
- * <em>Note! This is a legacy shortcut for (strict/non-lenient)
88
- * {@link #removeQuerySyntaxChars(String, boolean) removeQuerySyntaxChars(aQueryString, false)}.</em>
89
- * </p>
90
- * @param aQueryString a non-null query expression
91
- * @return a aQueryString without syntax chars or null if aQueryString is null
92
- * @see #removeQuerySyntaxChars(String, boolean)
93
- */
94
- export function removeQuerySyntaxChars(aQueryString: string): string;
61
+ /**
62
+ * Strips Local params for a query string.
63
+ *
64
+ * <p>
65
+ * Local params are a query string prefix that starts with "<code>{!</code>" and ends with "<code>}</code>".
66
+ * The Local Params can override/sidestep or affect desired search behaviour. This method strips Local params to prohibit that.
67
+ * Leading whitespace of Local params will also be stripped.
68
+ * </p>
69
+ * <table style="border:1px solid black" summary="">
70
+ * <caption style="text-align:left">Some examples</caption>
71
+ * <tr>
72
+ * <th>aQueryString</th><th>Returned</th>
73
+ * </tr>
74
+ * <tr>
75
+ * <td><code>null</code></td><td><code>null</code></td>
76
+ * </tr>
77
+ * <tr>
78
+ * <td><code>""</code></td><td><code>""</code></td>
79
+ * </tr>
80
+ * <tr>
81
+ * <td><code>"hello query"</code></td><td><code>"hello query"</code></td>
82
+ * </tr>
83
+ * <tr>
84
+ * <td><code>"{!}"</code></td><td><code>""</code></td>
85
+ * </tr>
86
+ * <tr>
87
+ * <td><code>"{!}hey"</code></td><td><code>"hey"</code></td>
88
+ * </tr>
89
+ * <tr>
90
+ * <td><code>"{!whatever}foo"</code></td><td><code>"foo"</code></td>
91
+ * </tr>
92
+ * <tr>
93
+ * <td><code>"{!whatever} bar"</code></td><td><code>" bar"</code></td>
94
+ * </tr>
95
+ * <tr>
96
+ * <td><code>" {! whatever }baz"</code></td><td><code>"baz"</code></td>
97
+ * </tr>
98
+ * <tr>
99
+ * <td><code>"{!whatever"</code></td><td><code>"{!whatever"</code></td>
100
+ * </tr>
101
+ * </table>
102
+ * @param aQueryString the query string
103
+ * @return aQueryString without any Local params
104
+ * @since Sitevision 10
105
+ */
106
+ stripLocalParams(aQueryString: string): string;
95
107
 
96
- /**
97
- * Removes query syntax characters from a query string and trims the result.
98
- *
99
- * <p>
100
- * Current query syntax characters are:<br>
101
- * <code>+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \</code><br>
102
- * </p>
103
- * <p>
104
- * Processing:
105
- * </p>
106
- * <ul>
107
- * <li>
108
- * The "any" char will be removed, i.e: <code>"ma?nus" -&gt; "manus"</code>
109
- * </li>
110
- * <li>
111
- * The "double" chars will be replaced with a "single" char, i.e: <code>"ma&amp;&amp;nus" -&gt; "ma&amp;nus"</code>
112
- * and <code>"ma||nus" -&gt; "ma|nus"</code>
113
- * </li>
114
- * <li>
115
- * The "not" chars will be removed, unless <code>aLenientRemove</code> is <code>true</code>. Lenient behaviour will
116
- * try to keep all dashes that can be interpreted as "word separators" <em>("bindestreck" in swedish)</em>.
117
- * </li>
118
- * <li>
119
- * Other chars will be replaced with a space. Subsequent syntax chars will only result in one space,
120
- * e.g: <code>"This is *so* funny!" -&gt; "This is so funny"</code>
121
- * </li>
122
- * </ul>
123
- *
124
- * <table style="border:1px solid black" summary="">
125
- * <caption style="text-align:left">Some examples</caption>
126
- * <tr>
127
- * <th>aQueryString</th><th>aLenientRemove</th><th>Returned</th>
128
- * </tr>
129
- * <tr>
130
- * <td><code>"(Site?vision: *Enterprise) !?"</code></td><td><code>true / false</code></td><td><code>"Sitevision Enterprise"</code></td>
131
- * </tr>
132
- * <tr>
133
- * <td><code>"Anna-Karin?"</code></td><td><code>true</code></td><td><code>"Anna-Karin"</code></td>
134
- * </tr>
135
- * <tr>
136
- * <td><code>"Anna-Karin?"</code></td><td><code>false</code></td><td><code>"Anna Karin"</code></td>
137
- * </tr>
138
- * </table>
139
- * @param aQueryString a non-null query expression
140
- * @param aLenientRemove whether or not to handle syntax chars in a lenient matter
141
- * @return a aQueryString without query syntax characters or null if aQueryString is null
142
- * @since Sitevision 8.2
143
- */
144
- export function removeQuerySyntaxChars(
145
- aQueryString: string,
146
- aLenientRemove: boolean
147
- ): string;
108
+ /**
109
+ * Removes all query syntax characters from a query string and trims the result.
110
+ *
111
+ * <p>
112
+ * Current query syntax characters are:<br>
113
+ * <code>+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \</code><br>
114
+ * </p>
115
+ *
116
+ * <p>
117
+ * <em>Note! This is a legacy shortcut for (strict/non-lenient)
118
+ * {@link #removeQuerySyntaxChars(String, boolean) removeQuerySyntaxChars(aQueryString, false)}.</em>
119
+ * </p>
120
+ * @param aQueryString a non-null query expression
121
+ * @return a aQueryString without syntax chars or null if aQueryString is null
122
+ * @see #removeQuerySyntaxChars(String, boolean)
123
+ */
124
+ removeQuerySyntaxChars(aQueryString: string): string;
148
125
 
149
- /**
150
- * Gets a prefix/wildcard query that potentially will be scored.
151
- *
152
- * <p>
153
- * <em>The general purpose/advantage of a raw wildcard query (i.e Prefix query) is that it will result in hits also for a partial word.
154
- * Typical a good thing for all "live-search/type-ahead" solutions.
155
- * The downside is that the search result of such query can be a real mess since all wildcard-hits are scored exactly the same
156
- * ("constant scoring"). In practice, this means that the hits of such search result can show up in random order.</em>
157
- * </p>
158
- * <p>
159
- * This method returns a <em>"smart"</em> wildcard query that combines the <strong>prefix-matching advantage</strong> of a raw wildcard query
160
- * with potential <strong>scoring capabilities</strong>.
161
- * This is achieved by a expanding the word to multiple terms and adding the wildcard to one of them and use an implicit OR.
162
- * In other words: <em>"build a query that matches the exact word or the wildcarded word"</em>.
163
- * </p>
164
- * <p>
165
- * The query string <code>"Car"</code> transformed into a smart wildcard query <code>"+(Car car*)"</code>
166
- * could conceptually result in a search result like this:
167
- * </p>
168
- * <ol>
169
- * <li>"Car sales" <em>(exact clause match + wildcard clause match: score 1.23)</em></li>
170
- * <li>"Carpets" <em>(wildcard clause match: constant scoring 1)</em></li>
171
- * <li>"Careless" <em>(wildcard clause match: constant scoring 1)</em></li>
172
- * </ol>
173
- * <p>
174
- * The word that is wildcarded will also be lowercased for better matching <em>(typically the query parser is primarily set up to use/query
175
- * analyzed fields, i.e. typically lowercased)</em>.
176
- * A word with a dash is potentially further duplicated for increased matching <em>(dash is the "any" syntax char but is handled lenient)</em>.
177
- * A word that ends with a {@link #removeQuerySyntaxChars(String, boolean) syntax character} will typically not be wildcarded at all.
178
- * A word that contains a syntax character will typically get a raw wildcard as-is.
179
- * </p>
180
- *
181
- * <table style="border:1px solid black" summary="">
182
- * <caption style="text-align:left">Some examples</caption>
183
- * <tr>
184
- * <th>aQueryString</th><th>Returned</th>
185
- * </tr>
186
- * <tr>
187
- * <td><code>null</code></td><td><code>null</code></td>
188
- * </tr>
189
- * <tr>
190
- * <td><code>" "</code></td><td><code>null</code></td>
191
- * </tr>
192
- * <tr>
193
- * <td><code>"Car"</code></td><td><code>"+(Car car*)"</code></td>
194
- * </tr>
195
- * <tr>
196
- * <td><code>"Car*"</code></td><td><code>"+(Car car*)"</code></td>
197
- * </tr>
198
- * <tr>
199
- * <td><code>"Car?"</code></td><td><code>"Car?"</code></td>
200
- * </tr>
201
- * <tr>
202
- * <td><code>"title:Car"</code></td><td><code>"title:Car*"</code></td>
203
- * </tr>
204
- * <tr>
205
- * <td><code>"Anna-Carin"</code></td><td><code>"+(Anna-Carin AnnaCarin (+Anna +carin*) anna-carin* annacarin*)"</code></td>
206
- * </tr>
207
- * <tr>
208
- * <td><code>"019-173030"</code></td><td><code>"+(019-173030 019173030 (+019 +173030*) 019-173030* 019173030*)"</code></td>
209
- * </tr>
210
- * </table>
211
- *
212
- * <p>
213
- * The smart wildcard query <strong>downside/caveat</strong> is that the actual query is more complex. This increased complexity
214
- * will typically distort the pattern matching for the Solr <em>Elevation</em> component, i.e. "elevated/sponsored" hits will typically
215
- * never work for smart wildcard queries.
216
- * </p>
217
- * @param aQueryString the query string
218
- * @return aQueryString as a "smart" wildcard query or null if aQueryString is null or blank
219
- * @since Sitevision 8.2
220
- */
221
- export function smartWildcard(aQueryString: string): string;
126
+ /**
127
+ * Removes query syntax characters from a query string and trims the result.
128
+ *
129
+ * <p>
130
+ * Current query syntax characters are:<br>
131
+ * <code>+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \</code><br>
132
+ * </p>
133
+ * <p>
134
+ * Processing:
135
+ * </p>
136
+ * <ul>
137
+ * <li>
138
+ * The "any" char will be removed, i.e: <code>"ma?nus" -&gt; "manus"</code>
139
+ * </li>
140
+ * <li>
141
+ * The "double" chars will be replaced with a "single" char, i.e: <code>"ma&amp;&amp;nus" -&gt; "ma&amp;nus"</code>
142
+ * and <code>"ma||nus" -&gt; "ma|nus"</code>
143
+ * </li>
144
+ * <li>
145
+ * The "not" chars will be removed, unless <code>aLenientRemove</code> is <code>true</code>. Lenient behaviour will
146
+ * try to keep all dashes that can be interpreted as "word separators" <em>("bindestreck" in swedish)</em>.
147
+ * </li>
148
+ * <li>
149
+ * Other chars will be replaced with a space. Subsequent syntax chars will only result in one space,
150
+ * e.g: <code>"This is *so* funny!" -&gt; "This is so funny"</code>
151
+ * </li>
152
+ * </ul>
153
+ *
154
+ * <table style="border:1px solid black" summary="">
155
+ * <caption style="text-align:left">Some examples</caption>
156
+ * <tr>
157
+ * <th>aQueryString</th><th>aLenientRemove</th><th>Returned</th>
158
+ * </tr>
159
+ * <tr>
160
+ * <td><code>"(Site?vision: *Enterprise) !?"</code></td><td><code>true / false</code></td><td><code>"Sitevision Enterprise"</code></td>
161
+ * </tr>
162
+ * <tr>
163
+ * <td><code>"Anna-Karin?"</code></td><td><code>true</code></td><td><code>"Anna-Karin"</code></td>
164
+ * </tr>
165
+ * <tr>
166
+ * <td><code>"Anna-Karin?"</code></td><td><code>false</code></td><td><code>"Anna Karin"</code></td>
167
+ * </tr>
168
+ * </table>
169
+ * @param aQueryString a non-null query expression
170
+ * @param aLenientRemove whether or not to handle syntax chars in a lenient matter
171
+ * @return a aQueryString without query syntax characters or null if aQueryString is null
172
+ * @since Sitevision 8.2
173
+ */
174
+ removeQuerySyntaxChars(aQueryString: string, aLenientRemove: boolean): string;
222
175
 
223
- /**
224
- * Transforms a string with delimiters to a string that could be used in a field-grouped query expression.
225
- *
226
- * <p>
227
- * This is a convenience method when you want to query something based on items in a string that are delimited
228
- * by some token. A typical example is a "keyword" metadata that contains multiple keywords delimited by a comma char.
229
- * </p>
230
- *
231
- * <p>
232
- * This method splits the <code>aStringToSplit</code> with the <code>aSplitExpression</code> and each part is
233
- * then trimmed and appended to the resulting string, separated with a space. Parts that contains a space char
234
- * is quoted.
235
- * </p>
236
- *
237
- * <table style="border:1px solid black" summary="">
238
- * <caption style="text-align:left">Some examples</caption>
239
- * <tr>
240
- * <th style="text-align:left">aStringToSplit</th><th style="text-align:left">aSplitExpression</th><th style="text-align:left">Returned</th>
241
- * </tr>
242
- * <tr>
243
- * <td><code>"one"</code></td><td><code>","</code></td><td><code>one</code></td>
244
- * </tr>
245
- * <tr>
246
- * <td><code>"one,two"</code></td><td><code>","</code></td><td><code>one two</code></td>
247
- * </tr>
248
- * <tr>
249
- * <td><code>"one, two"</code></td><td><code>","</code></td><td><code>one two</code></td>
250
- * </tr>
251
- * <tr>
252
- * <td><code>"one, two, three four"</code></td><td><code>","</code></td><td><code>one two "three four"</code></td>
253
- * </tr>
254
- * <tr><td colspan="3">&nbsp;</td></tr>
255
- * <tr>
256
- * <td><code>"one"</code></td><td><code>"aNonMatchingExpression"</code></td><td><code>one</code></td>
257
- * </tr>
258
- * <tr>
259
- * <td><code>"one,two"</code></td><td><code>"aNonMatchingExpression"</code></td><td><code>one,two</code></td>
260
- * </tr>
261
- * <tr>
262
- * <td><code>"one, two"</code></td><td><code>"aNonMatchingExpression"</code></td><td><code>"one, two"</code></td>
263
- * </tr>
264
- * <tr>
265
- * <td><code>"one, two, three four"</code></td><td><code>"aNonMatchingExpression"</code></td><td><code>"one, two, three four"</code></td>
266
- * </tr>
267
- * <tr><td colspan="3">&nbsp;</td></tr>
268
- * <tr>
269
- * <td><code>null</code></td><td><code>","</code></td><td><code>null</code></td>
270
- * </tr>
271
- * <tr>
272
- * <td><code>null</code></td><td><code>null</code></td><td><code>null</code></td>
273
- * </tr>
274
- * <tr><td colspan="3">&nbsp;</td></tr>
275
- * <tr>
276
- * <td><code>"one"</code></td><td><code>null</code></td><td><code>one</code></td>
277
- * </tr>
278
- * <tr>
279
- * <td><code>"one,two"</code></td><td><code>null</code></td><td><code>one,two</code></td>
280
- * </tr>
281
- * <tr>
282
- * <td><code>"one, two"</code></td><td><code>null</code></td><td><code>one, two</code></td>
283
- * </tr>
284
- * <tr>
285
- * <td><code>"one, two, three four"</code></td><td><code>null</code></td><td><code>one, two, three four</code></td>
286
- * </tr>
287
- * </table>
288
- * @param aStringToSplit the string that should be transformed
289
- * @param aSplitExpression the regular expression to split up <code>aStringToSplit</code> in parts
290
- * @return the result of the operation. if <code>aStringToSplit</code> is <code>null</code>, <code>null</code> will always be returned. if <code>aSplitExpression</code> is <code>null</code>, <code>aStringToSplit</code> will always be returned. if <code>aSplitExpression</code> is a non-matching expression, a trimmed <code>aStringToSplit</code> will always be returned, and it will be quoted if <code>aStringToSplit</code> contains a space char.
291
- */
292
- export function splitToQueryParts(
293
- aStringToSplit: string,
294
- aSplitExpression: string
295
- ): string;
176
+ /**
177
+ * Gets a prefix/wildcard query that potentially will be scored.
178
+ *
179
+ * <p>
180
+ * <em>The general purpose/advantage of a raw wildcard query (i.e Prefix query) is that it will result in hits also for a partial word.
181
+ * Typical a good thing for all "live-search/type-ahead" solutions.
182
+ * The downside is that the search result of such query can be a real mess since all wildcard-hits are scored exactly the same
183
+ * ("constant scoring"). In practice, this means that the hits of such search result can show up in random order.</em>
184
+ * </p>
185
+ * <p>
186
+ * This method returns a <em>"smart"</em> wildcard query that combines the <strong>prefix-matching advantage</strong> of a raw wildcard query
187
+ * with potential <strong>scoring capabilities</strong>.
188
+ * This is achieved by a expanding the word to multiple terms and adding the wildcard to one of them and use an implicit OR.
189
+ * In other words: <em>"build a query that matches the exact word or the wildcarded word"</em>.
190
+ * </p>
191
+ * <p>
192
+ * The query string <code>"Car"</code> transformed into a smart wildcard query <code>"+(Car car*)"</code>
193
+ * could conceptually result in a search result like this:
194
+ * </p>
195
+ * <ol>
196
+ * <li>"Car sales" <em>(exact clause match + wildcard clause match: score 1.23)</em></li>
197
+ * <li>"Carpets" <em>(wildcard clause match: constant scoring 1)</em></li>
198
+ * <li>"Careless" <em>(wildcard clause match: constant scoring 1)</em></li>
199
+ * </ol>
200
+ * <p>
201
+ * The word that is wildcarded will also be lowercased for better matching <em>(typically the query parser is primarily set up to use/query
202
+ * analyzed fields, i.e. typically lowercased)</em>.
203
+ * A word with a dash is potentially further duplicated for increased matching <em>(dash is the "any" syntax char but is handled lenient)</em>.
204
+ * A word that ends with a {@link #removeQuerySyntaxChars(String, boolean) syntax character} will typically not be wildcarded at all.
205
+ * A word that contains a syntax character will typically get a raw wildcard as-is.
206
+ * </p>
207
+ *
208
+ * <table style="border:1px solid black" summary="">
209
+ * <caption style="text-align:left">Some examples</caption>
210
+ * <tr>
211
+ * <th>aQueryString</th><th>Returned</th>
212
+ * </tr>
213
+ * <tr>
214
+ * <td><code>null</code></td><td><code>null</code></td>
215
+ * </tr>
216
+ * <tr>
217
+ * <td><code>" "</code></td><td><code>null</code></td>
218
+ * </tr>
219
+ * <tr>
220
+ * <td><code>"Car"</code></td><td><code>"+(Car car*)"</code></td>
221
+ * </tr>
222
+ * <tr>
223
+ * <td><code>"Car*"</code></td><td><code>"+(Car car*)"</code></td>
224
+ * </tr>
225
+ * <tr>
226
+ * <td><code>"Car?"</code></td><td><code>"Car?"</code></td>
227
+ * </tr>
228
+ * <tr>
229
+ * <td><code>"title:Car"</code></td><td><code>"title:Car*"</code></td>
230
+ * </tr>
231
+ * <tr>
232
+ * <td><code>"Anna-Carin"</code></td><td><code>"+(Anna-Carin AnnaCarin (+Anna +carin*) anna-carin* annacarin*)"</code></td>
233
+ * </tr>
234
+ * <tr>
235
+ * <td><code>"019-173030"</code></td><td><code>"+(019-173030 019173030 (+019 +173030*) 019-173030* 019173030*)"</code></td>
236
+ * </tr>
237
+ * </table>
238
+ *
239
+ * <p>
240
+ * The smart wildcard query <strong>downside/caveat</strong> is that the actual query is more complex. This increased complexity
241
+ * will typically distort the pattern matching for the Solr <em>Elevation</em> component, i.e. "elevated/sponsored" hits will typically
242
+ * never work for smart wildcard queries.
243
+ * </p>
244
+ * @param aQueryString the query string
245
+ * @return aQueryString as a "smart" wildcard query or null if aQueryString is null or blank
246
+ * @since Sitevision 8.2
247
+ */
248
+ smartWildcard(aQueryString: string): string;
296
249
 
297
- /**
298
- * Transforms multiple strings with delimiters to a string that could be used in a field-grouped query expression.
299
- *
300
- * <p>
301
- * This is a convenience method that executes {@link #splitToQueryParts(String, String)} for a collection of strings
302
- * and appends each returned value to a combined result, separated with a space. Whitespace only or <code>null</code>
303
- * values will be ignored.
304
- * </p>
305
- * <p>
306
- * <em>See {@link #splitToQueryParts(String, String)} how each string of the collection will be transformed.</em>
307
- * </p>
308
- * @param aStringsToSplit a collection of strings
309
- * @param aSplitExpression the regular expression to split up the strings in the <code>aStringsToSplit</code> collection in parts
310
- * @return the result of the {@link #splitToQueryParts(String, String)} operation for all strings in <code>aStringsToSplit</code>. if <code>aStringsToSplit</code> is <code>null</code> or empty, <code>null</code> will always be returned.
311
- * @see #splitToQueryParts(String, String)
312
- */
313
- export function splitCollectionToQueryParts(
314
- aStringsToSplit: unknown,
315
- aSplitExpression: string
316
- ): string;
250
+ /**
251
+ * Transforms a string with delimiters to a string that could be used in a field-grouped query expression.
252
+ *
253
+ * <p>
254
+ * This is a convenience method when you want to query something based on items in a string that are delimited
255
+ * by some token. A typical example is a "keyword" metadata that contains multiple keywords delimited by a comma char.
256
+ * </p>
257
+ *
258
+ * <p>
259
+ * This method splits the <code>aStringToSplit</code> with the <code>aSplitExpression</code> and each part is
260
+ * then trimmed and appended to the resulting string, separated with a space. Parts that contains a space char
261
+ * is quoted.
262
+ * </p>
263
+ *
264
+ * <table style="border:1px solid black" summary="">
265
+ * <caption style="text-align:left">Some examples</caption>
266
+ * <tr>
267
+ * <th style="text-align:left">aStringToSplit</th><th style="text-align:left">aSplitExpression</th><th style="text-align:left">Returned</th>
268
+ * </tr>
269
+ * <tr>
270
+ * <td><code>"one"</code></td><td><code>","</code></td><td><code>one</code></td>
271
+ * </tr>
272
+ * <tr>
273
+ * <td><code>"one,two"</code></td><td><code>","</code></td><td><code>one two</code></td>
274
+ * </tr>
275
+ * <tr>
276
+ * <td><code>"one, two"</code></td><td><code>","</code></td><td><code>one two</code></td>
277
+ * </tr>
278
+ * <tr>
279
+ * <td><code>"one, two, three four"</code></td><td><code>","</code></td><td><code>one two "three four"</code></td>
280
+ * </tr>
281
+ * <tr><td colspan="3">&nbsp;</td></tr>
282
+ * <tr>
283
+ * <td><code>"one"</code></td><td><code>"aNonMatchingExpression"</code></td><td><code>one</code></td>
284
+ * </tr>
285
+ * <tr>
286
+ * <td><code>"one,two"</code></td><td><code>"aNonMatchingExpression"</code></td><td><code>one,two</code></td>
287
+ * </tr>
288
+ * <tr>
289
+ * <td><code>"one, two"</code></td><td><code>"aNonMatchingExpression"</code></td><td><code>"one, two"</code></td>
290
+ * </tr>
291
+ * <tr>
292
+ * <td><code>"one, two, three four"</code></td><td><code>"aNonMatchingExpression"</code></td><td><code>"one, two, three four"</code></td>
293
+ * </tr>
294
+ * <tr><td colspan="3">&nbsp;</td></tr>
295
+ * <tr>
296
+ * <td><code>null</code></td><td><code>","</code></td><td><code>null</code></td>
297
+ * </tr>
298
+ * <tr>
299
+ * <td><code>null</code></td><td><code>null</code></td><td><code>null</code></td>
300
+ * </tr>
301
+ * <tr><td colspan="3">&nbsp;</td></tr>
302
+ * <tr>
303
+ * <td><code>"one"</code></td><td><code>null</code></td><td><code>one</code></td>
304
+ * </tr>
305
+ * <tr>
306
+ * <td><code>"one,two"</code></td><td><code>null</code></td><td><code>one,two</code></td>
307
+ * </tr>
308
+ * <tr>
309
+ * <td><code>"one, two"</code></td><td><code>null</code></td><td><code>one, two</code></td>
310
+ * </tr>
311
+ * <tr>
312
+ * <td><code>"one, two, three four"</code></td><td><code>null</code></td><td><code>one, two, three four</code></td>
313
+ * </tr>
314
+ * </table>
315
+ * @param aStringToSplit the string that should be transformed
316
+ * @param aSplitExpression the regular expression to split up <code>aStringToSplit</code> in parts
317
+ * @return the result of the operation. if <code>aStringToSplit</code> is <code>null</code>, <code>null</code> will always be returned. if <code>aSplitExpression</code> is <code>null</code>, <code>aStringToSplit</code> will always be returned. if <code>aSplitExpression</code> is a non-matching expression, a trimmed <code>aStringToSplit</code> will always be returned, and it will be quoted if <code>aStringToSplit</code> contains a space char.
318
+ */
319
+ splitToQueryParts(aStringToSplit: string, aSplitExpression: string): string;
317
320
 
318
- /**
319
- * Returns a field query that is properly grouped.
320
- *
321
- * <p>
322
- * This method trims the <code>aValueExpression</code> and analyzes the space-separated parts, quoted and unquoted.
323
- * The result will be a grouped field query if there are multiple parts in <code>aValueExpression</code> and a
324
- * non-grouped field query if there are only one part in <code>aValueExpression</code>.
325
- * </p>
326
- * <p>
327
- * Note that this is a convenience method only. Neither field or value will be syntactically checked in any way.
328
- * The caller of this method is responsible for passing values that the query parser used later on will accept.
329
- * </p>
330
- *
331
- * <table style="border:1px solid black" summary="">
332
- * <caption style="text-align:left">Some examples</caption>
333
- * <tr>
334
- * <th style="text-align:left">aFieldName</th>
335
- * <th style="text-align:left">aValueExpression</th>
336
- * <th style="text-align:left">Returned</th>
337
- * </tr>
338
- * <tr>
339
- * <td><code>content.analyzed</code></td>
340
- * <td><code>sitevision</code></td>
341
- * <td><code>content.analyzed:sitevision</code></td>
342
- * </tr>
343
- * <tr>
344
- * <td><code>+content.analyzed</code></td>
345
- * <td><code>sitevision*</code></td>
346
- * <td><code>+content.analyzed:sitevision*</code></td>
347
- * </tr>
348
- * <tr>
349
- * <td><code>-content.analyzed</code></td>
350
- * <td><code>enterprise</code></td>
351
- * <td><code>-content.analyzed:enterprise</code></td>
352
- * </tr>
353
- * <tr>
354
- * <td><code>content.analyzed</code></td>
355
- * <td><code>"sitevision enterprise"</code></td>
356
- * <td><code>content.analyzed:"sitevision enterprise"</code></td>
357
- * </tr>
358
- * <tr><td colspan="3">&nbsp;</td></tr>
359
- * <tr>
360
- * <td><code>content.analyzed</code></td>
361
- * <td><code>sitevision enterprise</code></td>
362
- * <td><code>content.analyzed:(sitevision enterprise)</code></td>
363
- * </tr>
364
- * <tr>
365
- * <td><code>content.analyzed</code></td>
366
- * <td><code>portal "sitevision enterprise"</code></td>
367
- * <td><code>content.analyzed:(portal "sitevision enterprise")</code></td>
368
- * </tr>
369
- * </table>
370
- * @param aFieldName the field expression
371
- * @param aValueExpression the value expression
372
- * @return a properly grouped field query. Note that <code>null</code> will be returned if <code>aFieldName</code> or <code>aValueExpression</code> is <code>null</code> or whitespace only.
373
- */
374
- export function getFieldQuery(
375
- aFieldName: string,
376
- aValueExpression: string
377
- ): string;
321
+ /**
322
+ * Transforms multiple strings with delimiters to a string that could be used in a field-grouped query expression.
323
+ *
324
+ * <p>
325
+ * This is a convenience method that executes {@link #splitToQueryParts(String, String)} for a collection of strings
326
+ * and appends each returned value to a combined result, separated with a space. Whitespace only or <code>null</code>
327
+ * values will be ignored.
328
+ * </p>
329
+ * <p>
330
+ * <em>See {@link #splitToQueryParts(String, String)} how each string of the collection will be transformed.</em>
331
+ * </p>
332
+ * @param aStringsToSplit a collection of strings
333
+ * @param aSplitExpression the regular expression to split up the strings in the <code>aStringsToSplit</code> collection in parts
334
+ * @return the result of the {@link #splitToQueryParts(String, String)} operation for all strings in <code>aStringsToSplit</code>. if <code>aStringsToSplit</code> is <code>null</code> or empty, <code>null</code> will always be returned.
335
+ * @see #splitToQueryParts(String, String)
336
+ */
337
+ splitCollectionToQueryParts(
338
+ aStringsToSplit: unknown,
339
+ aSplitExpression: string
340
+ ): string;
378
341
 
379
- /**
380
- * Returns a date formatted according to the Solr date string representation.
381
- *
382
- * <p>
383
- * All dates in Solr (Lucene) are stored using UTC (zulu time 'Z').
384
- * When a date is converted to a string that should be sent to Solr
385
- * (for example as a part of a query) the timezone must be taken into
386
- * consideration since no adjustments will be performed by the query parser.
387
- * </p>
388
- * @param aDate the date
389
- * @return aDate formatted according to Solr's date representation. Returns null if aDate is null.
390
- * @since Sitevision 4.2
391
- */
392
- export function getDateAsString(aDate: unknown): string;
342
+ /**
343
+ * Returns a field query that is properly grouped.
344
+ *
345
+ * <p>
346
+ * This method trims the <code>aValueExpression</code> and analyzes the space-separated parts, quoted and unquoted.
347
+ * The result will be a grouped field query if there are multiple parts in <code>aValueExpression</code> and a
348
+ * non-grouped field query if there are only one part in <code>aValueExpression</code>.
349
+ * </p>
350
+ * <p>
351
+ * Note that this is a convenience method only. Neither field or value will be syntactically checked in any way.
352
+ * The caller of this method is responsible for passing values that the query parser used later on will accept.
353
+ * </p>
354
+ *
355
+ * <table style="border:1px solid black" summary="">
356
+ * <caption style="text-align:left">Some examples</caption>
357
+ * <tr>
358
+ * <th style="text-align:left">aFieldName</th>
359
+ * <th style="text-align:left">aValueExpression</th>
360
+ * <th style="text-align:left">Returned</th>
361
+ * </tr>
362
+ * <tr>
363
+ * <td><code>content.analyzed</code></td>
364
+ * <td><code>sitevision</code></td>
365
+ * <td><code>content.analyzed:sitevision</code></td>
366
+ * </tr>
367
+ * <tr>
368
+ * <td><code>+content.analyzed</code></td>
369
+ * <td><code>sitevision*</code></td>
370
+ * <td><code>+content.analyzed:sitevision*</code></td>
371
+ * </tr>
372
+ * <tr>
373
+ * <td><code>-content.analyzed</code></td>
374
+ * <td><code>enterprise</code></td>
375
+ * <td><code>-content.analyzed:enterprise</code></td>
376
+ * </tr>
377
+ * <tr>
378
+ * <td><code>content.analyzed</code></td>
379
+ * <td><code>"sitevision enterprise"</code></td>
380
+ * <td><code>content.analyzed:"sitevision enterprise"</code></td>
381
+ * </tr>
382
+ * <tr><td colspan="3">&nbsp;</td></tr>
383
+ * <tr>
384
+ * <td><code>content.analyzed</code></td>
385
+ * <td><code>sitevision enterprise</code></td>
386
+ * <td><code>content.analyzed:(sitevision enterprise)</code></td>
387
+ * </tr>
388
+ * <tr>
389
+ * <td><code>content.analyzed</code></td>
390
+ * <td><code>portal "sitevision enterprise"</code></td>
391
+ * <td><code>content.analyzed:(portal "sitevision enterprise")</code></td>
392
+ * </tr>
393
+ * </table>
394
+ * @param aFieldName the field expression
395
+ * @param aValueExpression the value expression
396
+ * @return a properly grouped field query. Note that <code>null</code> will be returned if <code>aFieldName</code> or <code>aValueExpression</code> is <code>null</code> or whitespace only.
397
+ */
398
+ getFieldQuery(aFieldName: string, aValueExpression: string): string;
393
399
 
394
- /**
395
- * Query string utility interface.
396
- *
397
- * <p>
398
- * An instance of the Sitevision class implementing this interface can be obtained via
399
- * {@link senselogic.sitevision.api.search.SearchFactory#getQueryStringUtil()}.
400
- * See {@link senselogic.sitevision.api.search.SearchFactory} for how to obtain
401
- * an instance of the <code>SearchFactory</code> interface.
402
- * </p>The "match all" query string.
403
- *
404
- * <p>
405
- * This is the special query syntax (<code>"*:*"</code>) to use when querying "everything".
406
- * </p>
407
- * <p>
408
- * <em>
409
- * A common misunderstanding is that a single wildcard (i.e. <code>"*"</code>) would also query "everything". That is a false assumption.
410
- * A single wildcard is less efficient and it will only match docs that has data in the default query fields of the parser (i.e.
411
- * a single wildcard will potentially not include "everything").
412
- * </em>
413
- * </p>
414
- * @author Magnus Lövgren
415
- * @since Sitevision 3.6
416
- * @since Sitevision 8.2
417
- */
418
- declare namespace queryStringUtil {
419
- export {
420
- stripTrailingAnyChars,
421
- stripLocalParams,
422
- removeQuerySyntaxChars,
423
- smartWildcard,
424
- splitToQueryParts,
425
- splitCollectionToQueryParts,
426
- getFieldQuery,
427
- getDateAsString,
428
- };
400
+ /**
401
+ * Returns a date formatted according to the Solr date string representation.
402
+ *
403
+ * <p>
404
+ * All dates in Solr (Lucene) are stored using UTC (zulu time 'Z').
405
+ * When a date is converted to a string that should be sent to Solr
406
+ * (for example as a part of a query) the timezone must be taken into
407
+ * consideration since no adjustments will be performed by the query parser.
408
+ * </p>
409
+ * @param aDate the date
410
+ * @return aDate formatted according to Solr's date representation. Returns null if aDate is null.
411
+ * @since Sitevision 4.2
412
+ */
413
+ getDateAsString(aDate: unknown): string;
429
414
  }
430
415
 
416
+ declare namespace QueryStringUtil {}
417
+
418
+ declare var queryStringUtil: QueryStringUtil;
419
+
431
420
  export default queryStringUtil;