@sitevision/api 1.0.19 → 1.1.0-alpha.1
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.
- package/common/router/index.d.ts +1 -1
- package/hidden/javax/jcr/Binary/index.d.ts +86 -0
- package/hidden/javax/jcr/Credentials/index.d.ts +11 -0
- package/hidden/javax/jcr/ImportUUIDBehavior/index.d.ts +11 -0
- package/hidden/javax/jcr/Item/index.d.ts +353 -0
- package/hidden/javax/jcr/ItemVisitor/index.d.ts +41 -0
- package/hidden/javax/jcr/NamespaceRegistry/index.d.ts +100 -0
- package/hidden/javax/jcr/Node/index.d.ts +2808 -0
- package/hidden/javax/jcr/NodeIterator/index.d.ts +18 -0
- package/hidden/javax/jcr/Property/index.d.ts +801 -0
- package/hidden/javax/jcr/PropertyIterator/index.d.ts +17 -0
- package/hidden/javax/jcr/RangeIterator/index.d.ts +75 -0
- package/hidden/javax/jcr/Repository/index.d.ts +318 -0
- package/hidden/javax/jcr/RepositoryFactory/index.d.ts +90 -0
- package/hidden/javax/jcr/Value/index.d.ts +190 -0
- package/hidden/javax/jcr/ValueFactory/index.d.ts +179 -0
- package/hidden/javax/jcr/Workspace/index.d.ts +1061 -0
- package/hidden/javax/jcr/lock/Lock/index.d.ts +142 -0
- package/hidden/javax/jcr/lock/LockManager/index.d.ts +217 -0
- package/hidden/javax/jcr/nodetype/ItemDefinition/index.d.ts +219 -0
- package/hidden/javax/jcr/nodetype/NodeDefinition/index.d.ts +158 -0
- package/hidden/javax/jcr/nodetype/NodeDefinitionTemplate/index.d.ts +74 -0
- package/hidden/javax/jcr/nodetype/NodeType/index.d.ts +349 -0
- package/hidden/javax/jcr/nodetype/NodeTypeDefinition/index.d.ts +248 -0
- package/hidden/javax/jcr/nodetype/NodeTypeIterator/index.d.ts +16 -0
- package/hidden/javax/jcr/nodetype/NodeTypeManager/index.d.ts +218 -0
- package/hidden/javax/jcr/nodetype/NodeTypeTemplate/index.d.ts +98 -0
- package/hidden/javax/jcr/nodetype/PropertyDefinition/index.d.ts +536 -0
- package/hidden/javax/jcr/nodetype/PropertyDefinitionTemplate/index.d.ts +97 -0
- package/hidden/javax/jcr/observation/Event/index.d.ts +133 -0
- package/hidden/javax/jcr/observation/EventIterator/index.d.ts +20 -0
- package/hidden/javax/jcr/observation/EventJournal/index.d.ts +22 -0
- package/hidden/javax/jcr/observation/EventListener/index.d.ts +23 -0
- package/hidden/javax/jcr/observation/EventListenerIterator/index.d.ts +20 -0
- package/hidden/javax/jcr/observation/ObservationManager/index.d.ts +227 -0
- package/hidden/javax/jcr/query/Query/index.d.ts +201 -0
- package/hidden/javax/jcr/query/QueryManager/index.d.ts +73 -0
- package/hidden/javax/jcr/query/QueryResult/index.d.ts +51 -0
- package/hidden/javax/jcr/query/Row/index.d.ts +159 -0
- package/hidden/javax/jcr/query/RowIterator/index.d.ts +20 -0
- package/hidden/javax/jcr/query/qom/And/index.d.ts +26 -0
- package/hidden/javax/jcr/query/qom/BindVariableValue/index.d.ts +15 -0
- package/hidden/javax/jcr/query/qom/ChildNode/index.d.ts +27 -0
- package/hidden/javax/jcr/query/qom/ChildNodeJoinCondition/index.d.ts +27 -0
- package/hidden/javax/jcr/query/qom/Column/index.d.ts +39 -0
- package/hidden/javax/jcr/query/qom/Comparison/index.d.ts +82 -0
- package/hidden/javax/jcr/query/qom/Constraint/index.d.ts +13 -0
- package/hidden/javax/jcr/query/qom/DescendantNode/index.d.ts +31 -0
- package/hidden/javax/jcr/query/qom/DescendantNodeJoinCondition/index.d.ts +29 -0
- package/hidden/javax/jcr/query/qom/DynamicOperand/index.d.ts +9 -0
- package/hidden/javax/jcr/query/qom/EquiJoinCondition/index.d.ts +41 -0
- package/hidden/javax/jcr/query/qom/FullTextSearch/index.d.ts +89 -0
- package/hidden/javax/jcr/query/qom/FullTextSearchScore/index.d.ts +24 -0
- package/hidden/javax/jcr/query/qom/Join/index.d.ts +36 -0
- package/hidden/javax/jcr/query/qom/JoinCondition/index.d.ts +9 -0
- package/hidden/javax/jcr/query/qom/Length/index.d.ts +24 -0
- package/hidden/javax/jcr/query/qom/Literal/index.d.ts +18 -0
- package/hidden/javax/jcr/query/qom/LowerCase/index.d.ts +26 -0
- package/hidden/javax/jcr/query/qom/NodeLocalName/index.d.ts +16 -0
- package/hidden/javax/jcr/query/qom/NodeName/index.d.ts +16 -0
- package/hidden/javax/jcr/query/qom/Not/index.d.ts +20 -0
- package/hidden/javax/jcr/query/qom/Operand/index.d.ts +9 -0
- package/hidden/javax/jcr/query/qom/Or/index.d.ts +30 -0
- package/hidden/javax/jcr/query/qom/Ordering/index.d.ts +53 -0
- package/hidden/javax/jcr/query/qom/PropertyExistence/index.d.ts +24 -0
- package/hidden/javax/jcr/query/qom/PropertyValue/index.d.ts +25 -0
- package/hidden/javax/jcr/query/qom/QueryObjectModel/index.d.ts +64 -0
- package/hidden/javax/jcr/query/qom/QueryObjectModelConstants/index.d.ts +9 -0
- package/hidden/javax/jcr/query/qom/QueryObjectModelFactory/index.d.ts +638 -0
- package/hidden/javax/jcr/query/qom/SameNode/index.d.ts +27 -0
- package/hidden/javax/jcr/query/qom/SameNodeJoinCondition/index.d.ts +36 -0
- package/hidden/javax/jcr/query/qom/Selector/index.d.ts +35 -0
- package/hidden/javax/jcr/query/qom/Source/index.d.ts +9 -0
- package/hidden/javax/jcr/query/qom/StaticOperand/index.d.ts +10 -0
- package/hidden/javax/jcr/query/qom/UpperCase/index.d.ts +26 -0
- package/hidden/javax/jcr/retention/Hold/index.d.ts +34 -0
- package/hidden/javax/jcr/retention/RetentionManager/index.d.ts +189 -0
- package/hidden/javax/jcr/retention/RetentionPolicy/index.d.ts +21 -0
- package/hidden/javax/jcr/security/AccessControlEntry/index.d.ts +24 -0
- package/hidden/javax/jcr/security/AccessControlList/index.d.ts +91 -0
- package/hidden/javax/jcr/security/AccessControlManager/index.d.ts +297 -0
- package/hidden/javax/jcr/security/AccessControlPolicy/index.d.ts +11 -0
- package/hidden/javax/jcr/security/AccessControlPolicyIterator/index.d.ts +20 -0
- package/hidden/javax/jcr/security/NamedAccessControlPolicy/index.d.ts +22 -0
- package/hidden/javax/jcr/security/Privilege/index.d.ts +117 -0
- package/hidden/javax/jcr/version/Version/index.d.ts +121 -0
- package/hidden/javax/jcr/version/VersionHistory/index.d.ts +307 -0
- package/hidden/javax/jcr/version/VersionIterator/index.d.ts +20 -0
- package/hidden/javax/jcr/version/VersionManager/index.d.ts +1082 -0
- package/hidden/senselogic/sitevision/api/base/Builder/index.d.ts +102 -0
- package/hidden/senselogic/sitevision/api/base/Filter/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/base/FilterSplit/index.d.ts +50 -0
- package/hidden/senselogic/sitevision/api/base/Loadable/index.d.ts +15 -0
- package/hidden/senselogic/sitevision/api/base/Resolver/index.d.ts +31 -0
- package/hidden/senselogic/sitevision/api/base/Wrapper/index.d.ts +24 -0
- package/hidden/senselogic/sitevision/api/collaboration/CollaborationGroupWrapper/index.d.ts +417 -0
- package/hidden/senselogic/sitevision/api/format/NumericFormatter/index.d.ts +80 -0
- package/hidden/senselogic/sitevision/api/format/NumericFormatterBuilder/index.d.ts +100 -0
- package/hidden/senselogic/sitevision/api/i18n/Currency/index.d.ts +120 -0
- package/hidden/senselogic/sitevision/api/link/CustomLinkProcessor/index.d.ts +45 -0
- package/hidden/senselogic/sitevision/api/link/CustomLinkRenderData/index.d.ts +65 -0
- package/hidden/senselogic/sitevision/api/mail/Mail/index.d.ts +32 -0
- package/hidden/senselogic/sitevision/api/message/MessageTextLinker/index.d.ts +15 -0
- package/hidden/senselogic/sitevision/api/metadata/value/LinkValue/index.d.ts +23 -0
- package/hidden/senselogic/sitevision/api/metadata/value/RelatedValue/index.d.ts +23 -0
- package/hidden/senselogic/sitevision/api/property/VersionedPropertyUtil/index.d.ts +642 -0
- package/hidden/senselogic/sitevision/api/render/BuddyIconRenderer/BuddyIconInfo/index.d.ts +51 -0
- package/hidden/senselogic/sitevision/api/render/ImageScaler/index.d.ts +58 -0
- package/hidden/senselogic/sitevision/api/render/TextModuleRenderer/index.d.ts +301 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/ArticleUtilConstants/index.d.ts +85 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/ExceptionSuppressingProxyConstants/index.d.ts +31 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/IndexingUtilConstants/index.d.ts +31 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/LinkPageUtilConstants/index.d.ts +67 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/MathInstanceConstants/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/MimeTypeUtilConstants/index.d.ts +19 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/NodeTypeUtilConstants/index.d.ts +1243 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/OutputUtilConstants/index.d.ts +31 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/PageUtilConstants/index.d.ts +91 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/PortletContextUtilConstants/index.d.ts +27 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/PortletUtilConstants/index.d.ts +19 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/QueryStringUtilConstants/index.d.ts +19 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/SearchHitConstants/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/SearchResultConstants/index.d.ts +37 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/VersionUtilConstants/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/index.d.ts +8 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityContext/index.d.ts +50 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityEvaluator/index.d.ts +89 -0
- package/hidden/senselogic/sitevision/api/script/RequesterChainable/index.d.ts +119 -0
- package/hidden/senselogic/sitevision/api/script/app/RestAppInvoker/index.d.ts +272 -0
- package/hidden/senselogic/sitevision/api/script/factory/TypedArgument/index.d.ts +43 -0
- package/hidden/senselogic/sitevision/api/script/proxy/ExceptionSuppressingCollection/index.d.ts +94 -0
- package/hidden/senselogic/sitevision/api/script/proxy/ExceptionSuppressingIterator/index.d.ts +117 -0
- package/hidden/senselogic/sitevision/api/script/proxy/ExceptionSuppressingProxy/index.d.ts +90 -0
- package/hidden/senselogic/sitevision/api/search/SearchFieldUtil/index.d.ts +89 -0
- package/hidden/senselogic/sitevision/api/search/SearchHighlighter/index.d.ts +45 -0
- package/hidden/senselogic/sitevision/api/search/SearchHit/index.d.ts +1176 -0
- package/hidden/senselogic/sitevision/api/search/SearchResult/index.d.ts +414 -0
- package/hidden/senselogic/sitevision/api/search/facet/SearchFacetField/index.d.ts +27 -0
- package/hidden/senselogic/sitevision/api/search/facet/SearchFacetValue/index.d.ts +61 -0
- package/hidden/senselogic/sitevision/api/search/searcher/Searcher/index.d.ts +277 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/Filter/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/Highlight/index.d.ts +29 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/Monitor/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/Parser/index.d.ts +35 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/Sort/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/SpellCheck/index.d.ts +29 -0
- package/hidden/senselogic/sitevision/api/search/sort/CustomSort/index.d.ts +82 -0
- package/hidden/senselogic/sitevision/api/search/suggestion/SearchSuggestion/index.d.ts +21 -0
- package/hidden/senselogic/sitevision/api/security/DirectoryAttributes/index.d.ts +70 -0
- package/hidden/senselogic/sitevision/api/security/MessageDigester/index.d.ts +50 -0
- package/hidden/senselogic/sitevision/api/security/RoleAssignment/index.d.ts +72 -0
- package/hidden/senselogic/sitevision/api/security/RoleMatcher/index.d.ts +29 -0
- package/hidden/senselogic/sitevision/api/security/SecretStore/index.d.ts +55 -0
- package/hidden/senselogic/sitevision/api/security/UserUtil/index.d.ts +80 -0
- package/hidden/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilter/index.d.ts +36 -0
- package/hidden/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilterChain/index.d.ts +32 -0
- package/hidden/senselogic/sitevision/api/user/UserIdentityWrapper/index.d.ts +599 -0
- package/hidden/senselogic/sitevision/api/webresource/LinkTarget/index.d.ts +20 -0
- package/hidden/senselogic/sitevision/api/xml/XmlElement/index.d.ts +55 -0
- package/hidden/senselogic/sitevision/api/xml/XmlElementHandler/index.d.ts +17 -0
- package/package.json +2 -4
- package/server/AliasUtil/index.d.ts +25 -0
- package/server/AliasUtil/index.js +10 -0
- package/server/ArchiveUtil/index.d.ts +65 -11
- package/server/ArraysInstance/index.d.ts +1846 -0
- package/server/ArticleUtil/index.d.ts +381 -69
- package/server/AuthenticationUtil/index.d.ts +106 -0
- package/server/BookmarkUtil/index.d.ts +36 -28
- package/server/BuddyIconRenderer/index.d.ts +240 -0
- package/server/ClientUtil/index.d.ts +18 -4
- package/server/CollaborationFactory/index.d.ts +42 -25
- package/server/CollaborationGroupFolderUtil/index.d.ts +40 -29
- package/server/CollaborationGroupTemplateUtil/index.d.ts +71 -39
- package/server/CollaborationGroupUtil/index.d.ts +128 -55
- package/server/CollectionsInstance/index.d.ts +738 -0
- package/server/ColorUtil/index.d.ts +22 -17
- package/server/CompoundAndFilterBuilder/index.d.ts +60 -0
- package/server/CompoundComparatorBuilder/index.d.ts +63 -0
- package/server/CompoundOrFilterBuilder/index.d.ts +59 -0
- package/server/ContentNodeUtil/index.d.ts +76 -0
- package/server/CurrencyFactory/index.d.ts +135 -0
- package/server/DateUtil/index.d.ts +154 -77
- package/server/DecorationUtil/index.d.ts +23 -0
- package/server/DeviceUtil/index.d.ts +36 -0
- package/server/DirectoryUtil/index.d.ts +107 -47
- package/server/DocTypeUtil/index.d.ts +149 -0
- package/server/EndecUtil/index.d.ts +537 -91
- package/server/ExtendedDismaxParserBuilder/index.d.ts +311 -0
- package/server/FileIconRenderer/index.d.ts +346 -0
- package/server/FileUtil/index.d.ts +462 -0
- package/server/FilterBuilder/index.d.ts +120 -0
- package/server/FolderUtil/index.d.ts +161 -0
- package/server/FontUtil/index.d.ts +49 -0
- package/server/FormatterBuilderFactory/index.d.ts +129 -0
- package/server/HighlightBuilder/index.d.ts +194 -0
- package/server/IconUtil/index.d.ts +37 -0
- package/server/ImageLinkRenderer/index.d.ts +134 -0
- package/server/ImageRenderer/index.d.ts +613 -231
- package/server/ImageUtil/index.d.ts +430 -0
- package/server/IndexUtil/index.d.ts +71 -0
- package/server/IndexingUtil/index.d.ts +92 -0
- package/server/InstanceCreatorUtil/index.d.ts +661 -0
- package/server/InstanceTypeUtil/index.d.ts +202 -0
- package/server/JwtUtil/index.d.ts +217 -0
- package/server/LandingPageUtil/index.d.ts +67 -50
- package/server/LinkPageUtil/index.d.ts +468 -0
- package/server/LinkRenderer/index.d.ts +1157 -0
- package/server/LinkTargetBuilder/index.d.ts +146 -0
- package/server/LinkValueBuilder/index.d.ts +129 -52
- package/server/ListWrapper/index.d.ts +172 -0
- package/server/LocaleUtil/index.d.ts +695 -61
- package/server/LogUtil/index.d.ts +118 -77
- package/server/MailBuilder/index.d.ts +238 -0
- package/server/MailUtil/index.d.ts +98 -0
- package/server/MathInstance/index.d.ts +681 -0
- package/server/MessageDigesterFactory/index.d.ts +49 -0
- package/server/MetadataDefinitionUtil/index.d.ts +118 -0
- package/server/MetadataUtil/index.d.ts +524 -79
- package/server/MimeTypeUtil/index.d.ts +316 -0
- package/server/MonitorBuilder/index.d.ts +51 -0
- package/server/NodeComparatorUtil/index.d.ts +397 -0
- package/server/NodeFactoryUtil/index.d.ts +32 -0
- package/server/NodeFilterUtil/index.d.ts +924 -0
- package/server/NodeIteratorUtil/index.d.ts +322 -72
- package/server/NodeResolverUtil/index.d.ts +767 -0
- package/server/NodeTreeUtil/index.d.ts +339 -63
- package/server/NodeTypeUtil/index.d.ts +391 -197
- package/server/OfflineVersionPropertyUtil/index.d.ts +30 -0
- package/server/OnlineVersionPropertyUtil/index.d.ts +30 -0
- package/server/OutputUtil/index.d.ts +641 -0
- package/server/PageUtil/index.d.ts +330 -0
- package/server/PermissionUtil/index.d.ts +650 -0
- package/server/PortletContextUtil/index.d.ts +118 -37
- package/server/PortletContextUtil/index.js +1 -0
- package/server/PortletUtil/index.d.ts +40 -0
- package/server/PrincipalUtil/index.d.ts +51 -0
- package/server/Properties/index.d.ts +185 -38
- package/server/PropertyUtil/index.d.ts +2330 -406
- package/server/PublishingUtil/index.d.ts +385 -49
- package/server/QueryStringUtil/index.d.ts +737 -0
- package/server/RedirectUtil/index.d.ts +98 -0
- package/server/RelatedValueBuilder/index.d.ts +81 -39
- package/server/Requester/index.d.ts +441 -65
- package/server/ResourceLocatorUtil/index.d.ts +483 -227
- package/server/RestApi/index.d.ts +208 -23
- package/server/RestAppInvokerFactory/index.d.ts +73 -0
- package/server/RoleAssignmentBuilder/index.d.ts +60 -0
- package/server/RoleMatcherBuilder/index.d.ts +59 -0
- package/server/RoleUtil/index.d.ts +57 -0
- package/server/ScriptUtil/index.d.ts +625 -143
- package/server/SearchFactory/index.d.ts +133 -0
- package/server/SearchUtil/index.d.ts +164 -0
- package/server/SearcherBuilder/index.d.ts +260 -0
- package/server/Session/index.d.ts +1758 -0
- package/server/SimpleUserUtil/index.d.ts +39 -30
- package/server/SiteCookieUtil/index.d.ts +78 -53
- package/server/SortBuilder/index.d.ts +111 -0
- package/server/SpellCheckBuilder/index.d.ts +68 -0
- package/server/StandardParserBuilder/index.d.ts +112 -0
- package/server/StructureUtil/index.d.ts +167 -0
- package/server/SubscriberUtil/index.d.ts +122 -0
- package/server/SubscriptionUtil/index.d.ts +197 -0
- package/server/SystemUserUtil/index.d.ts +201 -98
- package/server/TagUtil/index.d.ts +193 -0
- package/server/TemplateUtil/index.d.ts +217 -0
- package/server/TemporaryFileNodeBuilder/index.d.ts +63 -0
- package/server/TemporaryNodeBuilder/index.d.ts +241 -0
- package/server/TextModuleRendererBuilder/index.d.ts +68 -0
- package/server/TimestampUtil/index.d.ts +98 -82
- package/server/TranslationUtil/index.d.ts +175 -0
- package/server/TrashcanUtil/index.d.ts +193 -24
- package/server/UserDataUtil/index.d.ts +167 -85
- package/server/UserFactory/index.d.ts +45 -30
- package/server/UserFieldRenderer/index.d.ts +258 -0
- package/server/UserIdentityUtil/index.d.ts +61 -29
- package/server/UserUtil/index.d.ts +69 -28
- package/server/Utils/index.d.ts +870 -12
- package/server/VelocityRenderer/index.d.ts +248 -0
- package/server/VersionUtil/index.d.ts +15 -12
- package/server/WebContentUtil/index.d.ts +644 -0
- package/server/WebResourceFactory/index.d.ts +66 -0
- package/server/XSLTUtil/index.d.ts +49 -10
- package/server/XmlParserUtil/index.d.ts +82 -81
- package/builtins/Binary/index.d.ts +0 -3
- package/builtins/Calendar/index.d.ts +0 -3
- package/builtins/Collection/index.d.ts +0 -3
- package/builtins/Date/index.d.ts +0 -3
- package/builtins/InputStream/index.d.ts +0 -3
- package/builtins/Instant/index.d.ts +0 -3
- package/builtins/List/index.d.ts +0 -3
- package/builtins/LocalDateTime/index.d.ts +0 -3
- package/builtins/Locale/index.d.ts +0 -3
- package/builtins/Node/index.d.ts +0 -3
- package/builtins/NodeIterator/index.d.ts +0 -27
- package/builtins/Property/index.d.ts +0 -3
- package/builtins/Serializable/index.d.ts +0 -3
- package/builtins/Set/index.d.ts +0 -3
- package/builtins/Throwable/index.d.ts +0 -3
- package/builtins/byte/index.d.ts +0 -3
|
@@ -0,0 +1,1176 @@
|
|
|
1
|
+
import Node from "../../../../../javax/jcr/Node";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* <p>
|
|
5
|
+
* A <code>SearchHit</code> is a container for the search result returned from an Index as well
|
|
6
|
+
* as for the representation of an internal hit as {@link javax.jcr.Node}.
|
|
7
|
+
* </p>
|
|
8
|
+
*
|
|
9
|
+
* <p id="knowyourfields">
|
|
10
|
+
* <strong>Know your fields!</strong> Ensure to call the proper "getField" method when getting a field value!
|
|
11
|
+
* Note that fields are of a specific <em>type</em> (<code>String</code>, <code>Boolean</code>, <code>Float</code>,
|
|
12
|
+
* <code>Long</code> or <code>Date</code>) and a field value can be <em>multi-valued</em> and/or <em>highlighted</em>.
|
|
13
|
+
* Regardless of type - it is always possible to get a field value as String, but converting it to the "original" type
|
|
14
|
+
* might be a difficult task for certain types (e.g. a <code>Date</code> field).
|
|
15
|
+
* </p>
|
|
16
|
+
*
|
|
17
|
+
* <p>
|
|
18
|
+
* <em>This object is short lived in that sense that it is invalid after a specified timespan.
|
|
19
|
+
* Make sure it's handled correspondingly (i.e. do not cache it).</em>
|
|
20
|
+
* </p><p>Checks if the value(-s) for a specified field contains a specific value.</p>
|
|
21
|
+
*
|
|
22
|
+
* <p>
|
|
23
|
+
* Convenience method to use when checking for a specific value. This method would typically be used when you are looking for a
|
|
24
|
+
* specific value in a <em>multi-valued</em> field. Typically <em>metadata</em> or a multi-valued default fields of the Sitevision
|
|
25
|
+
* standard/system index (e.g. <em>path</em> or <em>svtype</em>). Calling this method is more efficient than doing
|
|
26
|
+
* the contains check(-s) yourself (exemplified below):
|
|
27
|
+
* </p>
|
|
28
|
+
* <pre><code>
|
|
29
|
+
* boolean containsValue = false;
|
|
30
|
+
* List<String> fieldValues = aSearchHit.getFields("aFieldName");
|
|
31
|
+
* for (String fieldValue : fieldValues) {
|
|
32
|
+
* if (fieldValue.contains("a specific value")) {
|
|
33
|
+
* containsValue = true;
|
|
34
|
+
* break;
|
|
35
|
+
* }
|
|
36
|
+
* }</code></pre><p>Checks if the value(-s) for a specified field equals a specific value.</p>
|
|
37
|
+
*
|
|
38
|
+
* <p>
|
|
39
|
+
* Convenience method to use when checking for a specific value. This method would typically be used when you are looking for a
|
|
40
|
+
* specific value in a <em>multi-valued</em> field. Typically <em>metadata</em> or a multi-valued default fields of the Sitevision
|
|
41
|
+
* standard/system index (e.g. <em>path</em> or <em>svtype</em>). Calling this method is more efficient than doing
|
|
42
|
+
* the equals check(-s) yourself (exemplified below):
|
|
43
|
+
* </p>
|
|
44
|
+
* <pre><code>
|
|
45
|
+
* boolean equalsValue = false;
|
|
46
|
+
* List<String> fieldValues = aSearchHit.getFields("aFieldName");
|
|
47
|
+
* for (String fieldValue : fieldValues) {
|
|
48
|
+
* if (fieldValue.equals("a specific value")) {
|
|
49
|
+
* equalsValue = true;
|
|
50
|
+
* break;
|
|
51
|
+
* }
|
|
52
|
+
* }</code></pre>
|
|
53
|
+
*
|
|
54
|
+
* <p>
|
|
55
|
+
* <strong>An example:</strong>
|
|
56
|
+
* Your Site has a multi-valued metadata named "category" that is indexed
|
|
57
|
+
* (<em>the name of the stored, non-analyzed index field will be "metadata.category"</em>).
|
|
58
|
+
* The predefined set of selectable values for this metadata is "Internal", "External", "Personal", "Recreation", "Classified" and "Other".
|
|
59
|
+
* The page editors can select none or any combination of the predefined values for any node that is indexed.
|
|
60
|
+
* When rendering the search hits, you want to treat all search hits representing nodes that includes the "Classified" value for the
|
|
61
|
+
* "category" metadata differently. Below is an example that only handles the highlighted "summary" field for "non-Classified" hits:
|
|
62
|
+
* </p>
|
|
63
|
+
* <pre><code>
|
|
64
|
+
* for (SearchHit searchHit : searchResult) {
|
|
65
|
+
* ...
|
|
66
|
+
* if (!searchHit.fieldEquals("metadata.category", "Classfied")) {
|
|
67
|
+
* String summary = searchHit.getHighlightedField("summary", 500);
|
|
68
|
+
* ...
|
|
69
|
+
* }
|
|
70
|
+
* ...
|
|
71
|
+
* }</code></pre><p>Checks if the value(-s) for a specified field equals a specific value, case-insensitively.</p>
|
|
72
|
+
*
|
|
73
|
+
* <p>
|
|
74
|
+
* Convenience method to use when checking for a specific value, case-insensitively.
|
|
75
|
+
* This method would typically be used when you are looking for a
|
|
76
|
+
* specific value in a <em>multi-valued</em> field. Typically <em>metadata</em> or a multi-valued default fields of the Sitevision
|
|
77
|
+
* standard/system index (e.g. <em>path</em> or <em>svtype</em>). Calling this method is more efficient than doing
|
|
78
|
+
* the case-insensitive equals check(-s) yourself (exemplified below):
|
|
79
|
+
* </p>
|
|
80
|
+
* <pre><code>
|
|
81
|
+
* boolean equalsValue = false;
|
|
82
|
+
* List<String> fieldValues = aSearchHit.getFields("aFieldName");
|
|
83
|
+
* for (String fieldValue : fieldValues) {
|
|
84
|
+
* if (fieldValue.equalsIgnoreCase("a specific value")) {
|
|
85
|
+
* equalsValue = true;
|
|
86
|
+
* break;
|
|
87
|
+
* }
|
|
88
|
+
* }</code></pre>
|
|
89
|
+
*
|
|
90
|
+
* <p>
|
|
91
|
+
* <em>Note!</em> Always use the {@link #fieldEquals(String, String)} method instead when applicable!
|
|
92
|
+
* </p><p>Checks if the value(-s) for a specified field matches a specified regular expression.</p>
|
|
93
|
+
*
|
|
94
|
+
* <p>
|
|
95
|
+
* Convenience method to use when checking for a specific value using a regular expression.
|
|
96
|
+
* This method would typically be used when you are looking for a
|
|
97
|
+
* specific pattern in a <em>multi-valued</em> field. Typically <em>metadata</em> or a multi-valued default fields of the Sitevision
|
|
98
|
+
* standard/system index (e.g. <em>path</em> or <em>svtype</em>). Calling this method is more efficient than doing
|
|
99
|
+
* the matches check(-s) yourself (exemplified below):
|
|
100
|
+
* </p>
|
|
101
|
+
* <pre><code>
|
|
102
|
+
* String regularExpression = "[a-zA-Z]+"; <em>// Chars 'a' to 'z' and 'A' to 'Z' one or more times...</em>
|
|
103
|
+
*
|
|
104
|
+
* boolean matchesValue = false;
|
|
105
|
+
* List<String> fieldValues = aSearchHit.getFields("aFieldName");
|
|
106
|
+
* for (String fieldValue : fieldValues) {
|
|
107
|
+
* if (fieldValue.matches(regularExpression)) {
|
|
108
|
+
* matchesValue = true;
|
|
109
|
+
* break;
|
|
110
|
+
* }
|
|
111
|
+
* }</code></pre>
|
|
112
|
+
*
|
|
113
|
+
* <p>
|
|
114
|
+
* <strong>Note!</strong> This method creates, compiles and reuses <code>java.util.regex.Pattern</code> instances to improve matching
|
|
115
|
+
* performance for multiple values (typically when matching <em>multi-valued</em> field values). All such instances are cached in order to
|
|
116
|
+
* boost performance for subsequent calls to this method with the same <code>aRegularExpression</code>.
|
|
117
|
+
* </p>
|
|
118
|
+
*
|
|
119
|
+
* <p>
|
|
120
|
+
* <em>Tip!</em> Regular expression syntax documentation is available via Oracle's
|
|
121
|
+
* <a href="http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">java.util.regex.Pattern</a> javadoc.
|
|
122
|
+
* </p><p>Accesses the {@link javax.jcr.Node} corresponding to a {@link #TYPE_INTERNAL} hit. This
|
|
123
|
+
* value will always be null for a {@link #TYPE_EXTERNAL} hit.</p><p>The indexed content as string for a specified field.</p>
|
|
124
|
+
*
|
|
125
|
+
* <p>
|
|
126
|
+
* <strong>Note!</strong> This method returns the content as string for the <em>first</em> field that matches <code>aFieldName</code>.
|
|
127
|
+
* No considerations are made regarding the field's type. The field value will be treated as a string.
|
|
128
|
+
* Calling this method is more efficient than calling <code>SearchHit.getField(aFieldName, false)</code> but the result will be equivalent.
|
|
129
|
+
* </p>
|
|
130
|
+
*
|
|
131
|
+
* <p>
|
|
132
|
+
* For a <em>multi-valued</em> field, you would typically use {@link #getFields(String)} instead.
|
|
133
|
+
* </p><p>The indexed content as XML escaped string for a specified field.</p>
|
|
134
|
+
*
|
|
135
|
+
* <p>
|
|
136
|
+
* This is a convenience method for {@link #getField(String)} that also XML escapes the result
|
|
137
|
+
* (see {@link senselogic.sitevision.api.text.EndecUtil#escapeXML(String)}).
|
|
138
|
+
* A String that should be included in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
139
|
+
* </p>
|
|
140
|
+
* <p>
|
|
141
|
+
* This Velocity code:
|
|
142
|
+
* </p>
|
|
143
|
+
* <pre><code>
|
|
144
|
+
* #set ($endecUtil = $sitevisionUtils.endecUtil)
|
|
145
|
+
* ...
|
|
146
|
+
* <p>
|
|
147
|
+
* $endecUtil.escapeXML($searchHit.getField('title'))
|
|
148
|
+
* </p>
|
|
149
|
+
* </code></pre>
|
|
150
|
+
* <p>
|
|
151
|
+
* would typically be replaced with this:
|
|
152
|
+
* </p>
|
|
153
|
+
* <pre><code>
|
|
154
|
+
* ...
|
|
155
|
+
* <p>
|
|
156
|
+
* $!searchHit.getFieldEscaped('title')
|
|
157
|
+
* </p>
|
|
158
|
+
* </code></pre>
|
|
159
|
+
*
|
|
160
|
+
* <p>
|
|
161
|
+
* <strong>This method can not be used to get field content of a highlighted field!</strong>
|
|
162
|
+
* Use {@link #getHighlightedField(String, int)} instead to get the XML escaped content of a highlighted field.
|
|
163
|
+
* </p><p>The indexed content as string for a specified field, or a default value if no such field exist.</p>
|
|
164
|
+
*
|
|
165
|
+
* <p>
|
|
166
|
+
* <strong>Note!</strong> This is a convenience method for {@link #getField(String)} that enables you to avoid <code>null</code> checks.
|
|
167
|
+
* </p><p>The indexed content as XML escaped string for a specified field, or a default value if no such field exist.</p>
|
|
168
|
+
*
|
|
169
|
+
* <p>
|
|
170
|
+
* This is a convenience method for {@link #getField(String, String)} that also XML escapes the result
|
|
171
|
+
* (see {@link senselogic.sitevision.api.text.EndecUtil#escapeXML(String)}).
|
|
172
|
+
* A String that should be included in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
173
|
+
* </p>
|
|
174
|
+
* <p>
|
|
175
|
+
* This Velocity code:
|
|
176
|
+
* </p>
|
|
177
|
+
* <pre><code>
|
|
178
|
+
* #set ($endecUtil = $sitevisionUtils.endecUtil)
|
|
179
|
+
* ...
|
|
180
|
+
* <p>
|
|
181
|
+
* $endecUtil.escapeXML($searchHit.getField('title', ''))
|
|
182
|
+
* </p>
|
|
183
|
+
* </code></pre>
|
|
184
|
+
* <p>
|
|
185
|
+
* would typically be replaced with this:
|
|
186
|
+
* </p>
|
|
187
|
+
* <pre><code>
|
|
188
|
+
* ...
|
|
189
|
+
* <p>
|
|
190
|
+
* $searchHit.getFieldEscaped('title', '')
|
|
191
|
+
* </p>
|
|
192
|
+
* </code></pre>
|
|
193
|
+
*
|
|
194
|
+
* <p>
|
|
195
|
+
* <strong>This method can not be used to get field content of a highlighted field!</strong>
|
|
196
|
+
* Use {@link #getHighlightedField(String, int)} instead to get the XML escaped content of a highlighted field.
|
|
197
|
+
* </p><p>The indexed content as string for a specified field (with option to use first or largest field if multiple fields match).</p><p>The indexed content as XML escaped string for a specified field (with option to use first or largest field if multiple fields match).</p>
|
|
198
|
+
*
|
|
199
|
+
* <p>
|
|
200
|
+
* This is a convenience method for {@link #getField(String, boolean)} that also XML escapes the result
|
|
201
|
+
* (see {@link senselogic.sitevision.api.text.EndecUtil#escapeXML(String)}).
|
|
202
|
+
* A String that should be included in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
203
|
+
* </p>
|
|
204
|
+
* <p>
|
|
205
|
+
* This Velocity code:
|
|
206
|
+
* </p>
|
|
207
|
+
* <pre><code>
|
|
208
|
+
* #set ($endecUtil = $sitevisionUtils.endecUtil)
|
|
209
|
+
* ...
|
|
210
|
+
* <p>
|
|
211
|
+
* $endecUtil.escapeXML($searchHit.getField('title', true))
|
|
212
|
+
* </p>
|
|
213
|
+
* </code></pre>
|
|
214
|
+
* <p>
|
|
215
|
+
* would typically be replaced with this:
|
|
216
|
+
* </p>
|
|
217
|
+
* <pre><code>
|
|
218
|
+
* ...
|
|
219
|
+
* <p>
|
|
220
|
+
* $!searchHit.getFieldEscaped('title', true)
|
|
221
|
+
* </p>
|
|
222
|
+
* </code></pre>
|
|
223
|
+
*
|
|
224
|
+
* <p>
|
|
225
|
+
* <strong>This method can not be used to get field content of a highlighted field!</strong>
|
|
226
|
+
* Use {@link #getHighlightedField(String, int)} instead to get the XML escaped content of a highlighted field.
|
|
227
|
+
* </p><p>
|
|
228
|
+
* The indexed content as string for a specified field (with option to use first or largest field if multiple fields match),
|
|
229
|
+
* or a default value if no such field exist.
|
|
230
|
+
* </p>
|
|
231
|
+
*
|
|
232
|
+
* <p>
|
|
233
|
+
* <strong>Note!</strong> This is a convenience method for {@link #getField(String, boolean)}
|
|
234
|
+
* that enables you to avoid <code>null</code> checks.
|
|
235
|
+
* </p><p>
|
|
236
|
+
* The indexed content as XML escaped string for a specified field (with option to use first or largest field if multiple fields match),
|
|
237
|
+
* or a default value if no such field exist.
|
|
238
|
+
* </p>
|
|
239
|
+
*
|
|
240
|
+
* <p>
|
|
241
|
+
* This is a convenience method for {@link #getField(String, boolean, String)} that also XML escapes the result
|
|
242
|
+
* (see {@link senselogic.sitevision.api.text.EndecUtil#escapeXML(String)}).
|
|
243
|
+
* A String that should be included in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
244
|
+
* </p>
|
|
245
|
+
* <p>
|
|
246
|
+
* This Velocity code:
|
|
247
|
+
* </p>
|
|
248
|
+
* <pre><code>
|
|
249
|
+
* #set ($endecUtil = $sitevisionUtils.endecUtil)
|
|
250
|
+
* ...
|
|
251
|
+
* <p>
|
|
252
|
+
* $endecUtil.escapeXML($searchHit.getField('title', true, ''))
|
|
253
|
+
* </p>
|
|
254
|
+
* </code></pre>
|
|
255
|
+
* <p>
|
|
256
|
+
* would typically be replaced with this:
|
|
257
|
+
* </p>
|
|
258
|
+
* <pre><code>
|
|
259
|
+
* ...
|
|
260
|
+
* <p>
|
|
261
|
+
* $searchHit.getFieldEscaped('title', true, '')
|
|
262
|
+
* </p>
|
|
263
|
+
* </code></pre>
|
|
264
|
+
*
|
|
265
|
+
* <p>
|
|
266
|
+
* <strong>This method can not be used to get field content of a highlighted field!</strong>
|
|
267
|
+
* Use {@link #getHighlightedField(String, int)} instead to get the XML escaped content of a highlighted field.
|
|
268
|
+
* </p><p>The indexed content as a list of strings for a specified field.</p>
|
|
269
|
+
*
|
|
270
|
+
* <p>
|
|
271
|
+
* This method would typically be used for <em>multi-valued</em> fields. For a single-valued String field, you would typically use
|
|
272
|
+
* {@link #getField(String)} instead. No considerations are made regarding the field's type. The field values will be treated as strings.
|
|
273
|
+
* </p>
|
|
274
|
+
* <p>
|
|
275
|
+
* <strong>Note!</strong> If the field is highlighted, use {@link #getHighlightedFields(String, int)} instead.
|
|
276
|
+
* </p><p>The indexed content as a list of XML escaped strings for a specified field.</p>
|
|
277
|
+
*
|
|
278
|
+
* <p>
|
|
279
|
+
* This is a convenience method for {@link #getFields(String)} that also XML escapes the result
|
|
280
|
+
* (see {@link senselogic.sitevision.api.text.EndecUtil#escapeXML(String)}).
|
|
281
|
+
* A String that should be included in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
282
|
+
* </p>
|
|
283
|
+
*
|
|
284
|
+
* <p>
|
|
285
|
+
* <strong>This method can not be used to get field content of a highlighted field!</strong>
|
|
286
|
+
* Use {@link #getHighlightedFields(String, int)} instead to get the XML escaped content of a highlighted field.
|
|
287
|
+
* </p><p>The indexed content as a list of lenient truncated strings for a specified field.</p>
|
|
288
|
+
*
|
|
289
|
+
* <p>
|
|
290
|
+
* This method would typically be used for <em>multi-valued</em> fields. For a single-valued String field, you would typically use
|
|
291
|
+
* {@link #getFieldTruncated(String, int)} instead. No considerations are made regarding the field's type.
|
|
292
|
+
* The field values will be treated as strings.
|
|
293
|
+
* </p>
|
|
294
|
+
* <p>
|
|
295
|
+
* <strong>Note!</strong> If the field is highlighted, use {@link #getHighlightedFields(String, int)} instead.
|
|
296
|
+
* </p>
|
|
297
|
+
* <p>
|
|
298
|
+
* <em>Calling this method is is equivalent to calling <code>SearchHit.getFieldsTruncated(aFieldName, maxContentLength, true)</code>.</em>
|
|
299
|
+
* </p><p>The indexed content as a list of truncated (lenient or not) strings for a specified field.</p>
|
|
300
|
+
*
|
|
301
|
+
* <p>
|
|
302
|
+
* This method would typically be used for <em>multi-valued</em> fields. For a single-valued String field, you would typically use
|
|
303
|
+
* {@link #getFieldTruncated(String, int)} instead. No considerations are made regarding the field's type.
|
|
304
|
+
* The field values will be treated as strings.
|
|
305
|
+
* </p>
|
|
306
|
+
* <p>
|
|
307
|
+
* <strong>Note!</strong> If the field is highlighted, use {@link #getHighlightedFields(String, int)} instead.
|
|
308
|
+
* </p><p>The indexed content as Boolean for a specified field.</p>
|
|
309
|
+
*
|
|
310
|
+
* <p>
|
|
311
|
+
* <strong>Note!</strong> This method returns the content as Boolean for the <em>first</em> field that matches <code>aFieldName</code>.
|
|
312
|
+
* </p><p>The indexed contents as a list of Boolean values for a specified field.</p>
|
|
313
|
+
*
|
|
314
|
+
* <p>
|
|
315
|
+
* This method would typically be used for <em>multi-valued</em> fields. For a single-valued field, you would typically use
|
|
316
|
+
* {@link #getBooleanField(String)} instead.
|
|
317
|
+
* </p><p>The indexed content as Date for a specified field.</p>
|
|
318
|
+
*
|
|
319
|
+
* <p>
|
|
320
|
+
* <strong>Note!</strong> This method returns the content as Date for the <em>first</em> field that matches <code>aFieldName</code>.
|
|
321
|
+
* </p><p>The indexed contents as a list of Date values for a specified field.</p>
|
|
322
|
+
*
|
|
323
|
+
* <p>
|
|
324
|
+
* This method would typically be used for <em>multi-valued</em> Date fields. For a single-valued Date field, you would typically use
|
|
325
|
+
* {@link #getDateField(String)} instead.
|
|
326
|
+
* </p><p>The indexed content as Float for a specified field.</p>
|
|
327
|
+
*
|
|
328
|
+
* <p>
|
|
329
|
+
* <strong>Note!</strong> This method returns the content as Float for the <em>first</em> field that matches <code>aFieldName</code>.
|
|
330
|
+
* </p><p>The indexed contents as a list of Float values for a specified field.</p>
|
|
331
|
+
*
|
|
332
|
+
* <p>
|
|
333
|
+
* This method would typically be used for <em>multi-valued</em> Float fields. For a single-valued Float field, you would typically use
|
|
334
|
+
* {@link #getFloatField(String)} instead.
|
|
335
|
+
* </p><p>The indexed content as Long for a specified field.</p>
|
|
336
|
+
*
|
|
337
|
+
* <p>
|
|
338
|
+
* <strong>Note!</strong> This method returns the content as Long for the <em>first</em> field that matches <code>aFieldName</code>.
|
|
339
|
+
* </p><p>The indexed contents as a list of Long values for a specified field.</p>
|
|
340
|
+
*
|
|
341
|
+
* <p>
|
|
342
|
+
* This method would typically be used for <em>multi-valued</em> Long fields. For a single-valued Long field, you would typically use
|
|
343
|
+
* {@link #getLongField(String)} instead.
|
|
344
|
+
* </p><p>The encoded and highlighted content of a highlighted field.</p>
|
|
345
|
+
*
|
|
346
|
+
* <p>
|
|
347
|
+
* <strong>Note!</strong> The result of this method is <em>always</em> escaped/encoded to XML entities so it won't interfere with the html
|
|
348
|
+
* elements that surround the possible "highlighted" fragments!
|
|
349
|
+
* </p><p>The encoded and highlighted contents of a highlighted field.</p>
|
|
350
|
+
*
|
|
351
|
+
* <p>
|
|
352
|
+
* This method would typically be used for <em>multi-valued</em> highlighted fields. For a single-valued highlighted field
|
|
353
|
+
* (or if you only are interested in the largest highlighted value), you would typically use {@link #getHighlightedField(String, int)} instead.
|
|
354
|
+
* No considerations are made regarding the field's type. The field values will be treated as strings.
|
|
355
|
+
* </p>
|
|
356
|
+
*
|
|
357
|
+
* <p>
|
|
358
|
+
* <strong>Note!</strong> The items in the result of this method is <em>always</em> escaped/encoded to XML entities so they won't interfere
|
|
359
|
+
* with the html elements that surround the possible "highlighted" fragments!
|
|
360
|
+
* </p><p>The indexed content as string for a specified field, truncated to a lenient max size.</p>
|
|
361
|
+
*
|
|
362
|
+
* <p>
|
|
363
|
+
* <strong>Note!</strong> Calling this method is is equivalent to calling
|
|
364
|
+
* <code>SearchHit.getFieldTruncated(aFieldName, true, true, maxContentLength)</code>.
|
|
365
|
+
* </p>
|
|
366
|
+
*
|
|
367
|
+
* <p>
|
|
368
|
+
* <strong>Note!</strong> If the field is highlighted, use {@link #getHighlightedField(String, int)} instead.
|
|
369
|
+
* </p><p>
|
|
370
|
+
* The indexed content as string for a specified field, truncated (lenient or not) to a max size and an option to use first
|
|
371
|
+
* or largest field if multiple fields match.
|
|
372
|
+
* </p>
|
|
373
|
+
*
|
|
374
|
+
* <p>
|
|
375
|
+
* <strong>Note!</strong> If the field is highlighted, use {@link #getHighlightedField(String, int)} instead.
|
|
376
|
+
* </p>The names of all fields available in this search hit.
|
|
377
|
+
*
|
|
378
|
+
* <p>
|
|
379
|
+
* <em>Potentially also includes the Solr pseudo fields "score" and "[elevated]".</em>
|
|
380
|
+
* </p>The relative search score of the hit.
|
|
381
|
+
*
|
|
382
|
+
* <p>
|
|
383
|
+
* The value ranges from 0 to 1 where 1 denotes the maximum score.
|
|
384
|
+
* Note that the first hit does not necessarily has score 1, it is just the hit with the
|
|
385
|
+
* highest relative score in the {@link SearchResult}.
|
|
386
|
+
* </p>
|
|
387
|
+
*
|
|
388
|
+
* <p>
|
|
389
|
+
* <em>
|
|
390
|
+
* This method depends on availability of the Solr score pseudo field.
|
|
391
|
+
* Search queries without that field will always return 0,
|
|
392
|
+
* </em>
|
|
393
|
+
* </p>
|
|
394
|
+
*
|
|
395
|
+
* <p>
|
|
396
|
+
* <strong>Tip!</strong> Use this method to see the scores of your hits when debugging and tuning search field boost weights et al.
|
|
397
|
+
* </p>Whether or not the search hit was elevated in the query result.
|
|
398
|
+
*
|
|
399
|
+
* <p>
|
|
400
|
+
* <em>
|
|
401
|
+
* This method depends on availability of the Solr [elevated] pseudo field.
|
|
402
|
+
* Search queries without that field will always return false,
|
|
403
|
+
* typically when custom fields (the Solr 'fl' param) is specified.
|
|
404
|
+
* </em>
|
|
405
|
+
* </p><p>The type of <code>SearchHit</code> object.</p>Returns a jQuery expression with a token that enables tracking of search hit clicks.
|
|
406
|
+
*
|
|
407
|
+
* <p>
|
|
408
|
+
* Tracking search hits clicks is a helpful tool when analyzing if visitors seems to find interesting information in their search results.
|
|
409
|
+
* Though, if the search result isn't really inited by the user (i.e. an A-Z listing or such), adding a click tracking callback is probably
|
|
410
|
+
* not a good idea.
|
|
411
|
+
* </p>
|
|
412
|
+
*
|
|
413
|
+
* <p>
|
|
414
|
+
* A click tracking callback would typically be applied as value for the "onclick" and "onkeypress" attributes of a search hit link.
|
|
415
|
+
* When rendering links to search hits with the {@link senselogic.sitevision.api.render.LinkRenderer}, apply the click tracking callback via
|
|
416
|
+
* {@link senselogic.sitevision.api.render.LinkRenderer#setOnclick(String)}
|
|
417
|
+
* </p><p>Indicates that the hit is an internal resource managed by the Sitevision server</p><p>Indicates that the hit is an external resource</p>
|
|
418
|
+
* @author Mikael Wikblom
|
|
419
|
+
* @since Sitevision 2.6_06
|
|
420
|
+
*/
|
|
421
|
+
interface SearchHit {
|
|
422
|
+
/**
|
|
423
|
+
* <p>Checks if the value(-s) for a specified field contains a specific value.</p>
|
|
424
|
+
*
|
|
425
|
+
* <p>
|
|
426
|
+
* Convenience method to use when checking for a specific value. This method would typically be used when you are looking for a
|
|
427
|
+
* specific value in a <em>multi-valued</em> field. Typically <em>metadata</em> or a multi-valued default fields of the Sitevision
|
|
428
|
+
* standard/system index (e.g. <em>path</em> or <em>svtype</em>). Calling this method is more efficient than doing
|
|
429
|
+
* the contains check(-s) yourself (exemplified below):
|
|
430
|
+
* </p>
|
|
431
|
+
* <pre><code>
|
|
432
|
+
* boolean containsValue = false;
|
|
433
|
+
* List<String> fieldValues = aSearchHit.getFields("aFieldName");
|
|
434
|
+
* for (String fieldValue : fieldValues) {
|
|
435
|
+
* if (fieldValue.contains("a specific value")) {
|
|
436
|
+
* containsValue = true;
|
|
437
|
+
* break;
|
|
438
|
+
* }
|
|
439
|
+
* }</code></pre>
|
|
440
|
+
* @param aFieldName the name of the field.
|
|
441
|
+
* @param aValue the value to look for in the field value(-s).
|
|
442
|
+
* @return whether or not the value for the field <code>aFieldName</code> contains <code>aValue</code>. If the <code>aFieldName</code> field is <em>multi-valued</em>, this method will return <code>true</code> if <em>any</em> of the field values contains <code>aValue</code>, <code>false</code> otherwise. A <code>null</code> or empty value for <code>aFieldName</code> or <code>aValue</code> will always return <code>false</code>.
|
|
443
|
+
* @see #fieldEquals(String, String)
|
|
444
|
+
* @see #fieldEqualsIgnoreCase(String, String)
|
|
445
|
+
* @see #fieldMatches(String, String)
|
|
446
|
+
* @since Sitevision 3.5
|
|
447
|
+
*/
|
|
448
|
+
fieldContains(aFieldName: string, aValue: string): boolean;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* <p>Checks if the value(-s) for a specified field equals a specific value.</p>
|
|
452
|
+
*
|
|
453
|
+
* <p>
|
|
454
|
+
* Convenience method to use when checking for a specific value. This method would typically be used when you are looking for a
|
|
455
|
+
* specific value in a <em>multi-valued</em> field. Typically <em>metadata</em> or a multi-valued default fields of the Sitevision
|
|
456
|
+
* standard/system index (e.g. <em>path</em> or <em>svtype</em>). Calling this method is more efficient than doing
|
|
457
|
+
* the equals check(-s) yourself (exemplified below):
|
|
458
|
+
* </p>
|
|
459
|
+
* <pre><code>
|
|
460
|
+
* boolean equalsValue = false;
|
|
461
|
+
* List<String> fieldValues = aSearchHit.getFields("aFieldName");
|
|
462
|
+
* for (String fieldValue : fieldValues) {
|
|
463
|
+
* if (fieldValue.equals("a specific value")) {
|
|
464
|
+
* equalsValue = true;
|
|
465
|
+
* break;
|
|
466
|
+
* }
|
|
467
|
+
* }</code></pre>
|
|
468
|
+
*
|
|
469
|
+
* <p>
|
|
470
|
+
* <strong>An example:</strong>
|
|
471
|
+
* Your Site has a multi-valued metadata named "category" that is indexed
|
|
472
|
+
* (<em>the name of the stored, non-analyzed index field will be "metadata.category"</em>).
|
|
473
|
+
* The predefined set of selectable values for this metadata is "Internal", "External", "Personal", "Recreation", "Classified" and "Other".
|
|
474
|
+
* The page editors can select none or any combination of the predefined values for any node that is indexed.
|
|
475
|
+
* When rendering the search hits, you want to treat all search hits representing nodes that includes the "Classified" value for the
|
|
476
|
+
* "category" metadata differently. Below is an example that only handles the highlighted "summary" field for "non-Classified" hits:
|
|
477
|
+
* </p>
|
|
478
|
+
* <pre><code>
|
|
479
|
+
* for (SearchHit searchHit : searchResult) {
|
|
480
|
+
* ...
|
|
481
|
+
* if (!searchHit.fieldEquals("metadata.category", "Classfied")) {
|
|
482
|
+
* String summary = searchHit.getHighlightedField("summary", 500);
|
|
483
|
+
* ...
|
|
484
|
+
* }
|
|
485
|
+
* ...
|
|
486
|
+
* }</code></pre>
|
|
487
|
+
* @param aFieldName the name of the field.
|
|
488
|
+
* @param aValue the value to compare to the field value(-s).
|
|
489
|
+
* @return whether or not the value for the field <code>aFieldName</code> equals <code>aValue</code>. If the <code>aFieldName</code> field is <em>multi-valued</em>, this method will return <code>true</code> if <em>any</em> of the field values equals <code>aValue</code>, <code>false</code> otherwise. A <code>null</code> or empty value for <code>aFieldName</code> or <code>aValue</code> will always return <code>false</code>.
|
|
490
|
+
* @see #fieldEqualsIgnoreCase(String, String)
|
|
491
|
+
* @see #fieldContains(String, String)
|
|
492
|
+
* @see #fieldMatches(String, String)
|
|
493
|
+
* @since Sitevision 3.5
|
|
494
|
+
*/
|
|
495
|
+
fieldEquals(aFieldName: string, aValue: string): boolean;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* <p>Checks if the value(-s) for a specified field equals a specific value, case-insensitively.</p>
|
|
499
|
+
*
|
|
500
|
+
* <p>
|
|
501
|
+
* Convenience method to use when checking for a specific value, case-insensitively.
|
|
502
|
+
* This method would typically be used when you are looking for a
|
|
503
|
+
* specific value in a <em>multi-valued</em> field. Typically <em>metadata</em> or a multi-valued default fields of the Sitevision
|
|
504
|
+
* standard/system index (e.g. <em>path</em> or <em>svtype</em>). Calling this method is more efficient than doing
|
|
505
|
+
* the case-insensitive equals check(-s) yourself (exemplified below):
|
|
506
|
+
* </p>
|
|
507
|
+
* <pre><code>
|
|
508
|
+
* boolean equalsValue = false;
|
|
509
|
+
* List<String> fieldValues = aSearchHit.getFields("aFieldName");
|
|
510
|
+
* for (String fieldValue : fieldValues) {
|
|
511
|
+
* if (fieldValue.equalsIgnoreCase("a specific value")) {
|
|
512
|
+
* equalsValue = true;
|
|
513
|
+
* break;
|
|
514
|
+
* }
|
|
515
|
+
* }</code></pre>
|
|
516
|
+
*
|
|
517
|
+
* <p>
|
|
518
|
+
* <em>Note!</em> Always use the {@link #fieldEquals(String, String)} method instead when applicable!
|
|
519
|
+
* </p>
|
|
520
|
+
* @param aFieldName the name of the field.
|
|
521
|
+
* @param aValue the value to case-insensitively compare to the field value(-s).
|
|
522
|
+
* @return whether or not the value for the field <code>aFieldName</code> case-insensitively equals <code>aValue</code>. If the <code>aFieldName</code> field is <em>multi-valued</em>, this method will return <code>true</code> if <em>any</em> of the field values case-insensitively equals <code>aValue</code>, <code>false</code> otherwise. A <code>null</code> or empty value for <code>aFieldName</code> or <code>aValue</code> will always return <code>false</code>.
|
|
523
|
+
* @see #fieldEquals(String, String)
|
|
524
|
+
* @see #fieldContains(String, String)
|
|
525
|
+
* @see #fieldMatches(String, String)
|
|
526
|
+
* @since Sitevision 3.5
|
|
527
|
+
*/
|
|
528
|
+
fieldEqualsIgnoreCase(aFieldName: string, aValue: string): boolean;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* <p>Checks if the value(-s) for a specified field matches a specified regular expression.</p>
|
|
532
|
+
*
|
|
533
|
+
* <p>
|
|
534
|
+
* Convenience method to use when checking for a specific value using a regular expression.
|
|
535
|
+
* This method would typically be used when you are looking for a
|
|
536
|
+
* specific pattern in a <em>multi-valued</em> field. Typically <em>metadata</em> or a multi-valued default fields of the Sitevision
|
|
537
|
+
* standard/system index (e.g. <em>path</em> or <em>svtype</em>). Calling this method is more efficient than doing
|
|
538
|
+
* the matches check(-s) yourself (exemplified below):
|
|
539
|
+
* </p>
|
|
540
|
+
* <pre><code>
|
|
541
|
+
* String regularExpression = "[a-zA-Z]+"; <em>// Chars 'a' to 'z' and 'A' to 'Z' one or more times...</em>
|
|
542
|
+
*
|
|
543
|
+
* boolean matchesValue = false;
|
|
544
|
+
* List<String> fieldValues = aSearchHit.getFields("aFieldName");
|
|
545
|
+
* for (String fieldValue : fieldValues) {
|
|
546
|
+
* if (fieldValue.matches(regularExpression)) {
|
|
547
|
+
* matchesValue = true;
|
|
548
|
+
* break;
|
|
549
|
+
* }
|
|
550
|
+
* }</code></pre>
|
|
551
|
+
*
|
|
552
|
+
* <p>
|
|
553
|
+
* <strong>Note!</strong> This method creates, compiles and reuses <code>java.util.regex.Pattern</code> instances to improve matching
|
|
554
|
+
* performance for multiple values (typically when matching <em>multi-valued</em> field values). All such instances are cached in order to
|
|
555
|
+
* boost performance for subsequent calls to this method with the same <code>aRegularExpression</code>.
|
|
556
|
+
* </p>
|
|
557
|
+
*
|
|
558
|
+
* <p>
|
|
559
|
+
* <em>Tip!</em> Regular expression syntax documentation is available via Oracle's
|
|
560
|
+
* <a href="http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">java.util.regex.Pattern</a> javadoc.
|
|
561
|
+
* </p>
|
|
562
|
+
* @param aFieldName the name of the field.
|
|
563
|
+
* @param aRegularExpression the regular expression to match to the field value(-s).
|
|
564
|
+
* @return whether or not the value for the field <code>aFieldName</code> matches a <code>aRegularExpression</code>. If the <code>aFieldName</code> field is <em>multi-valued</em>, this method will return <code>true</code> if <em>any</em> of the field values matches <code>aRegularExpression</code>, <code>false</code> otherwise. A <code>null</code> or empty value for <code>aFieldName</code> or <code>aRegularExpression</code> will always return <code>false</code>.
|
|
565
|
+
* @throws PatternSyntaxException if the regular syntax expression of <code>aRegularExpression</code> is invalid.
|
|
566
|
+
* @see #fieldContains(String, String)
|
|
567
|
+
* @see #fieldEquals(String, String)
|
|
568
|
+
* @see #fieldEqualsIgnoreCase(String, String)
|
|
569
|
+
* @since Sitevision 3.5
|
|
570
|
+
*/
|
|
571
|
+
fieldMatches(aFieldName: string, aRegularExpression: string): boolean;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* <p>Accesses the {@link javax.jcr.Node} corresponding to a {@link #TYPE_INTERNAL} hit. This
|
|
575
|
+
* value will always be null for a {@link #TYPE_EXTERNAL} hit.</p>
|
|
576
|
+
* @return A <code>Node</code> or <code>null</code>
|
|
577
|
+
*/
|
|
578
|
+
getNode(): Node;
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* <p>The indexed content as string for a specified field.</p>
|
|
582
|
+
*
|
|
583
|
+
* <p>
|
|
584
|
+
* <strong>Note!</strong> This method returns the content as string for the <em>first</em> field that matches <code>aFieldName</code>.
|
|
585
|
+
* No considerations are made regarding the field's type. The field value will be treated as a string.
|
|
586
|
+
* Calling this method is more efficient than calling <code>SearchHit.getField(aFieldName, false)</code> but the result will be equivalent.
|
|
587
|
+
* </p>
|
|
588
|
+
*
|
|
589
|
+
* <p>
|
|
590
|
+
* For a <em>multi-valued</em> field, you would typically use {@link #getFields(String)} instead.
|
|
591
|
+
* </p>
|
|
592
|
+
* @param aFieldName the name of the field.
|
|
593
|
+
* @return the content of the first index field specified by <code>aFieldName</code>, or <code>null</code> if no such field exist.
|
|
594
|
+
* @see #getFieldEscaped(String)
|
|
595
|
+
* @see #getField(String, String)
|
|
596
|
+
* @see #getField(String, boolean)
|
|
597
|
+
* @see #getFields(String)
|
|
598
|
+
* @see #getBooleanField(String)
|
|
599
|
+
* @see #getDateField(String)
|
|
600
|
+
* @see #getFloatField(String)
|
|
601
|
+
* @see #getLongField(String)
|
|
602
|
+
*/
|
|
603
|
+
getField(aFieldName: string): string;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* <p>The indexed content as XML escaped string for a specified field.</p>
|
|
607
|
+
*
|
|
608
|
+
* <p>
|
|
609
|
+
* This is a convenience method for {@link #getField(String)} that also XML escapes the result
|
|
610
|
+
* (see {@link senselogic.sitevision.api.text.EndecUtil#escapeXML(String)}).
|
|
611
|
+
* A String that should be included in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
612
|
+
* </p>
|
|
613
|
+
* <p>
|
|
614
|
+
* This Velocity code:
|
|
615
|
+
* </p>
|
|
616
|
+
* <pre><code>
|
|
617
|
+
* #set ($endecUtil = $sitevisionUtils.endecUtil)
|
|
618
|
+
* ...
|
|
619
|
+
* <p>
|
|
620
|
+
* $endecUtil.escapeXML($searchHit.getField('title'))
|
|
621
|
+
* </p>
|
|
622
|
+
* </code></pre>
|
|
623
|
+
* <p>
|
|
624
|
+
* would typically be replaced with this:
|
|
625
|
+
* </p>
|
|
626
|
+
* <pre><code>
|
|
627
|
+
* ...
|
|
628
|
+
* <p>
|
|
629
|
+
* $!searchHit.getFieldEscaped('title')
|
|
630
|
+
* </p>
|
|
631
|
+
* </code></pre>
|
|
632
|
+
*
|
|
633
|
+
* <p>
|
|
634
|
+
* <strong>This method can not be used to get field content of a highlighted field!</strong>
|
|
635
|
+
* Use {@link #getHighlightedField(String, int)} instead to get the XML escaped content of a highlighted field.
|
|
636
|
+
* </p>
|
|
637
|
+
* @param aFieldName the name of the field.
|
|
638
|
+
* @return the XML escaped content of the first index field specified by <code>aFieldName</code>, or <code>null</code> if no such field exist.
|
|
639
|
+
* @see #getField(String)
|
|
640
|
+
* @since Sitevision 4
|
|
641
|
+
*/
|
|
642
|
+
getFieldEscaped(aFieldName: string): string;
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* <p>The indexed content as string for a specified field, or a default value if no such field exist.</p>
|
|
646
|
+
*
|
|
647
|
+
* <p>
|
|
648
|
+
* <strong>Note!</strong> This is a convenience method for {@link #getField(String)} that enables you to avoid <code>null</code> checks.
|
|
649
|
+
* </p>
|
|
650
|
+
* @param aFieldName the name of the field.
|
|
651
|
+
* @param aDefaultValue the default/fallback value.
|
|
652
|
+
* @return the content of the first index field specified by <code>aFieldName</code>, or <code>aDefaultValue</code> if no such field exist.
|
|
653
|
+
* @see #getField(String)
|
|
654
|
+
* @see #getFieldEscaped(String, String)
|
|
655
|
+
* @since Sitevision 3.5
|
|
656
|
+
*/
|
|
657
|
+
getField(aFieldName: string, aDefaultValue: string): string;
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* <p>The indexed content as XML escaped string for a specified field, or a default value if no such field exist.</p>
|
|
661
|
+
*
|
|
662
|
+
* <p>
|
|
663
|
+
* This is a convenience method for {@link #getField(String, String)} that also XML escapes the result
|
|
664
|
+
* (see {@link senselogic.sitevision.api.text.EndecUtil#escapeXML(String)}).
|
|
665
|
+
* A String that should be included in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
666
|
+
* </p>
|
|
667
|
+
* <p>
|
|
668
|
+
* This Velocity code:
|
|
669
|
+
* </p>
|
|
670
|
+
* <pre><code>
|
|
671
|
+
* #set ($endecUtil = $sitevisionUtils.endecUtil)
|
|
672
|
+
* ...
|
|
673
|
+
* <p>
|
|
674
|
+
* $endecUtil.escapeXML($searchHit.getField('title', ''))
|
|
675
|
+
* </p>
|
|
676
|
+
* </code></pre>
|
|
677
|
+
* <p>
|
|
678
|
+
* would typically be replaced with this:
|
|
679
|
+
* </p>
|
|
680
|
+
* <pre><code>
|
|
681
|
+
* ...
|
|
682
|
+
* <p>
|
|
683
|
+
* $searchHit.getFieldEscaped('title', '')
|
|
684
|
+
* </p>
|
|
685
|
+
* </code></pre>
|
|
686
|
+
*
|
|
687
|
+
* <p>
|
|
688
|
+
* <strong>This method can not be used to get field content of a highlighted field!</strong>
|
|
689
|
+
* Use {@link #getHighlightedField(String, int)} instead to get the XML escaped content of a highlighted field.
|
|
690
|
+
* </p>
|
|
691
|
+
* @param aFieldName the name of the field.
|
|
692
|
+
* @param aDefaultValue the default/fallback value.
|
|
693
|
+
* @return the XML escaped content of the first index field specified by <code>aFieldName</code>, or <code>aDefaultValue</code> if no such field exist. Note that <code>aDefaultValue</code> is <em>not</em> XML escaped by this method!
|
|
694
|
+
* @see #getField(String, String)
|
|
695
|
+
* @since Sitevision 4
|
|
696
|
+
*/
|
|
697
|
+
getFieldEscaped(aFieldName: string, aDefaultValue: string): string;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* <p>The indexed content as string for a specified field (with option to use first or largest field if multiple fields match).</p>
|
|
701
|
+
* @param aFieldName The name of the field.
|
|
702
|
+
* @param useMaxCharsField whether the field that contains the most characters or the first field should be used if multiple fields match (i.e. <code>true</code> == use the matching field that contains most characters, <code>false</code> == use first matching field).
|
|
703
|
+
* @return the content of the index field with name <code>aFieldName</code>, or <code>null</code> if no such field exist.
|
|
704
|
+
* @see #getField(String)
|
|
705
|
+
* @see #getField(String, boolean, String)
|
|
706
|
+
* @see #getFieldEscaped(String, boolean)
|
|
707
|
+
* @since Sitevision 2.7_06
|
|
708
|
+
*/
|
|
709
|
+
getField(aFieldName: string, useMaxCharsField: boolean): string;
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* <p>The indexed content as XML escaped string for a specified field (with option to use first or largest field if multiple fields match).</p>
|
|
713
|
+
*
|
|
714
|
+
* <p>
|
|
715
|
+
* This is a convenience method for {@link #getField(String, boolean)} that also XML escapes the result
|
|
716
|
+
* (see {@link senselogic.sitevision.api.text.EndecUtil#escapeXML(String)}).
|
|
717
|
+
* A String that should be included in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
718
|
+
* </p>
|
|
719
|
+
* <p>
|
|
720
|
+
* This Velocity code:
|
|
721
|
+
* </p>
|
|
722
|
+
* <pre><code>
|
|
723
|
+
* #set ($endecUtil = $sitevisionUtils.endecUtil)
|
|
724
|
+
* ...
|
|
725
|
+
* <p>
|
|
726
|
+
* $endecUtil.escapeXML($searchHit.getField('title', true))
|
|
727
|
+
* </p>
|
|
728
|
+
* </code></pre>
|
|
729
|
+
* <p>
|
|
730
|
+
* would typically be replaced with this:
|
|
731
|
+
* </p>
|
|
732
|
+
* <pre><code>
|
|
733
|
+
* ...
|
|
734
|
+
* <p>
|
|
735
|
+
* $!searchHit.getFieldEscaped('title', true)
|
|
736
|
+
* </p>
|
|
737
|
+
* </code></pre>
|
|
738
|
+
*
|
|
739
|
+
* <p>
|
|
740
|
+
* <strong>This method can not be used to get field content of a highlighted field!</strong>
|
|
741
|
+
* Use {@link #getHighlightedField(String, int)} instead to get the XML escaped content of a highlighted field.
|
|
742
|
+
* </p>
|
|
743
|
+
* @param aFieldName The name of the field.
|
|
744
|
+
* @param useMaxCharsField whether the field that contains the most characters or the first field should be used if multiple fields match (i.e. <code>true</code> == use the matching field that contains most characters, <code>false</code> == use first matching field).
|
|
745
|
+
* @return the XML escaped content of the index field with name <code>aFieldName</code>, or <code>null</code> if no such field exist.
|
|
746
|
+
* @see #getField(String, boolean)
|
|
747
|
+
* @since Sitevision 4
|
|
748
|
+
*/
|
|
749
|
+
getFieldEscaped(aFieldName: string, useMaxCharsField: boolean): string;
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* <p>
|
|
753
|
+
* The indexed content as string for a specified field (with option to use first or largest field if multiple fields match),
|
|
754
|
+
* or a default value if no such field exist.
|
|
755
|
+
* </p>
|
|
756
|
+
*
|
|
757
|
+
* <p>
|
|
758
|
+
* <strong>Note!</strong> This is a convenience method for {@link #getField(String, boolean)}
|
|
759
|
+
* that enables you to avoid <code>null</code> checks.
|
|
760
|
+
* </p>
|
|
761
|
+
* @param aFieldName The name of the field.
|
|
762
|
+
* @param useMaxCharsField whether the field that contains the most characters or the first field should be used if multiple fields match (i.e. <code>true</code> == use the matching field that contains most characters, <code>false</code> == use first matching field).
|
|
763
|
+
* @param aDefaultValue the default/fallback value.
|
|
764
|
+
* @return the content of the index field with name <code>aFieldName</code>, or <code>aDefaultValue</code> if no such field exist.
|
|
765
|
+
* @see #getField(String)
|
|
766
|
+
* @see #getField(String, boolean)
|
|
767
|
+
* @see #getFieldEscaped(String, boolean, String)
|
|
768
|
+
* @since Sitevision 3.5
|
|
769
|
+
*/
|
|
770
|
+
getField(
|
|
771
|
+
aFieldName: string,
|
|
772
|
+
useMaxCharsField: boolean,
|
|
773
|
+
aDefaultValue: string
|
|
774
|
+
): string;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* <p>
|
|
778
|
+
* The indexed content as XML escaped string for a specified field (with option to use first or largest field if multiple fields match),
|
|
779
|
+
* or a default value if no such field exist.
|
|
780
|
+
* </p>
|
|
781
|
+
*
|
|
782
|
+
* <p>
|
|
783
|
+
* This is a convenience method for {@link #getField(String, boolean, String)} that also XML escapes the result
|
|
784
|
+
* (see {@link senselogic.sitevision.api.text.EndecUtil#escapeXML(String)}).
|
|
785
|
+
* A String that should be included in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
786
|
+
* </p>
|
|
787
|
+
* <p>
|
|
788
|
+
* This Velocity code:
|
|
789
|
+
* </p>
|
|
790
|
+
* <pre><code>
|
|
791
|
+
* #set ($endecUtil = $sitevisionUtils.endecUtil)
|
|
792
|
+
* ...
|
|
793
|
+
* <p>
|
|
794
|
+
* $endecUtil.escapeXML($searchHit.getField('title', true, ''))
|
|
795
|
+
* </p>
|
|
796
|
+
* </code></pre>
|
|
797
|
+
* <p>
|
|
798
|
+
* would typically be replaced with this:
|
|
799
|
+
* </p>
|
|
800
|
+
* <pre><code>
|
|
801
|
+
* ...
|
|
802
|
+
* <p>
|
|
803
|
+
* $searchHit.getFieldEscaped('title', true, '')
|
|
804
|
+
* </p>
|
|
805
|
+
* </code></pre>
|
|
806
|
+
*
|
|
807
|
+
* <p>
|
|
808
|
+
* <strong>This method can not be used to get field content of a highlighted field!</strong>
|
|
809
|
+
* Use {@link #getHighlightedField(String, int)} instead to get the XML escaped content of a highlighted field.
|
|
810
|
+
* </p>
|
|
811
|
+
* @param aFieldName The name of the field.
|
|
812
|
+
* @param useMaxCharsField whether the field that contains the most characters or the first field should be used if multiple fields match (i.e. <code>true</code> == use the matching field that contains most characters, <code>false</code> == use first matching field).
|
|
813
|
+
* @param aDefaultValue the default/fallback value.
|
|
814
|
+
* @return the XML escaped content of the index field with name <code>aFieldName</code>, or <code>aDefaultValue</code> if no such field exist. Note that <code>aDefaultValue</code> is <em>not</em> XML escaped by this method!
|
|
815
|
+
* @see #getField(String, boolean, String)
|
|
816
|
+
* @since Sitevision 4
|
|
817
|
+
*/
|
|
818
|
+
getFieldEscaped(
|
|
819
|
+
aFieldName: string,
|
|
820
|
+
useMaxCharsField: boolean,
|
|
821
|
+
aDefaultValue: string
|
|
822
|
+
): string;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* <p>The indexed content as a list of strings for a specified field.</p>
|
|
826
|
+
*
|
|
827
|
+
* <p>
|
|
828
|
+
* This method would typically be used for <em>multi-valued</em> fields. For a single-valued String field, you would typically use
|
|
829
|
+
* {@link #getField(String)} instead. No considerations are made regarding the field's type. The field values will be treated as strings.
|
|
830
|
+
* </p>
|
|
831
|
+
* <p>
|
|
832
|
+
* <strong>Note!</strong> If the field is highlighted, use {@link #getHighlightedFields(String, int)} instead.
|
|
833
|
+
* </p>
|
|
834
|
+
* @param aFieldName the name of the field.
|
|
835
|
+
* @return the content of the fields specified by <code>aFieldName</code>, or an <code>empty List</code> if no such fields exist.
|
|
836
|
+
* @see #getFieldsTruncated(String, int)
|
|
837
|
+
* @since Sitevision 3.0.3
|
|
838
|
+
*/
|
|
839
|
+
getFields(aFieldName: string): unknown[];
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* <p>The indexed content as a list of XML escaped strings for a specified field.</p>
|
|
843
|
+
*
|
|
844
|
+
* <p>
|
|
845
|
+
* This is a convenience method for {@link #getFields(String)} that also XML escapes the result
|
|
846
|
+
* (see {@link senselogic.sitevision.api.text.EndecUtil#escapeXML(String)}).
|
|
847
|
+
* A String that should be included in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
848
|
+
* </p>
|
|
849
|
+
*
|
|
850
|
+
* <p>
|
|
851
|
+
* <strong>This method can not be used to get field content of a highlighted field!</strong>
|
|
852
|
+
* Use {@link #getHighlightedFields(String, int)} instead to get the XML escaped content of a highlighted field.
|
|
853
|
+
* </p>
|
|
854
|
+
* @param aFieldName the name of the field.
|
|
855
|
+
* @return the XML escaped content of the fields specified by <code>aFieldName</code>, or an <code>empty List</code> if no such fields exist.
|
|
856
|
+
* @see #getFields(String)
|
|
857
|
+
* @since Sitevision 4
|
|
858
|
+
*/
|
|
859
|
+
getFieldsEscaped(aFieldName: string): unknown[];
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* <p>The indexed content as a list of lenient truncated strings for a specified field.</p>
|
|
863
|
+
*
|
|
864
|
+
* <p>
|
|
865
|
+
* This method would typically be used for <em>multi-valued</em> fields. For a single-valued String field, you would typically use
|
|
866
|
+
* {@link #getFieldTruncated(String, int)} instead. No considerations are made regarding the field's type.
|
|
867
|
+
* The field values will be treated as strings.
|
|
868
|
+
* </p>
|
|
869
|
+
* <p>
|
|
870
|
+
* <strong>Note!</strong> If the field is highlighted, use {@link #getHighlightedFields(String, int)} instead.
|
|
871
|
+
* </p>
|
|
872
|
+
* <p>
|
|
873
|
+
* <em>Calling this method is is equivalent to calling <code>SearchHit.getFieldsTruncated(aFieldName, maxContentLength, true)</code>.</em>
|
|
874
|
+
* </p>
|
|
875
|
+
* @param aFieldName the name of the field.
|
|
876
|
+
* @param maxContentLength max length of the content that should be returned. A value lower than 1 will be ignored (i.e. content will not be truncated).
|
|
877
|
+
* @return the contents of the index field with name <code>aFieldName</code> truncated so it contains at most <code>maxContentLength</code> characters, or an <code>empty List</code> if no such field exist.
|
|
878
|
+
* @see #getFieldsTruncated(String, int, boolean)
|
|
879
|
+
* @since Sitevision 3.0.3
|
|
880
|
+
*/
|
|
881
|
+
getFieldsTruncated(aFieldName: string, maxContentLength: number): unknown[];
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* <p>The indexed content as a list of truncated (lenient or not) strings for a specified field.</p>
|
|
885
|
+
*
|
|
886
|
+
* <p>
|
|
887
|
+
* This method would typically be used for <em>multi-valued</em> fields. For a single-valued String field, you would typically use
|
|
888
|
+
* {@link #getFieldTruncated(String, int)} instead. No considerations are made regarding the field's type.
|
|
889
|
+
* The field values will be treated as strings.
|
|
890
|
+
* </p>
|
|
891
|
+
* <p>
|
|
892
|
+
* <strong>Note!</strong> If the field is highlighted, use {@link #getHighlightedFields(String, int)} instead.
|
|
893
|
+
* </p>
|
|
894
|
+
* @param aFieldName the name of the field.
|
|
895
|
+
* @param maxContentLength max length of the content that should be returned. A value lower than 1 will be ignored (i.e. content will not be truncated).
|
|
896
|
+
* @param useLenientTruncation whether or not the truncation should be lenient. A value of <code>true</code> indicates that the truncation should be after the last complete word but less or equal to <code>maxContentLength</code> A value of <code>false</code> indicates that the truncation should be absolute, i.e. truncation is made at <code>maxContentLength</code> even if it cuts a word.
|
|
897
|
+
* @return the contents of the index field with name <code>aFieldName</code> truncated so it contains at most <code>maxContentLength</code> characters, or an <code>empty List</code> if no such field exist.
|
|
898
|
+
* @see #getFieldsTruncated(String, int)
|
|
899
|
+
* @since Sitevision 3.0.3
|
|
900
|
+
*/
|
|
901
|
+
getFieldsTruncated(
|
|
902
|
+
aFieldName: string,
|
|
903
|
+
maxContentLength: number,
|
|
904
|
+
useLenientTruncation: boolean
|
|
905
|
+
): unknown[];
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* <p>The indexed content as Boolean for a specified field.</p>
|
|
909
|
+
*
|
|
910
|
+
* <p>
|
|
911
|
+
* <strong>Note!</strong> This method returns the content as Boolean for the <em>first</em> field that matches <code>aFieldName</code>.
|
|
912
|
+
* </p>
|
|
913
|
+
* @param aFieldName the name of the field.
|
|
914
|
+
* @return the Boolean/content of the first index field specified by <code>aFieldName</code>, or <code>null</code> if no such field exist or if it's value can't be treated as a Boolean.
|
|
915
|
+
* @see #getBooleanFields(String)
|
|
916
|
+
* @since Sitevision 3.0
|
|
917
|
+
*/
|
|
918
|
+
getBooleanField(aFieldName: string): boolean;
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* <p>The indexed contents as a list of Boolean values for a specified field.</p>
|
|
922
|
+
*
|
|
923
|
+
* <p>
|
|
924
|
+
* This method would typically be used for <em>multi-valued</em> fields. For a single-valued field, you would typically use
|
|
925
|
+
* {@link #getBooleanField(String)} instead.
|
|
926
|
+
* </p>
|
|
927
|
+
* @param aFieldName the name of the field.
|
|
928
|
+
* @return a list of Boolean values from the index field specified by <code>aFieldName</code>, or an <code>empty List</code> if no such field exist or no value can be treated as a Boolean.
|
|
929
|
+
* @see #getBooleanField(String)
|
|
930
|
+
* @since Sitevision 3.0.3
|
|
931
|
+
*/
|
|
932
|
+
getBooleanFields(aFieldName: string): unknown[];
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* <p>The indexed content as Date for a specified field.</p>
|
|
936
|
+
*
|
|
937
|
+
* <p>
|
|
938
|
+
* <strong>Note!</strong> This method returns the content as Date for the <em>first</em> field that matches <code>aFieldName</code>.
|
|
939
|
+
* </p>
|
|
940
|
+
* @param aFieldName the name of the field.
|
|
941
|
+
* @return the Date/content of the first index field specified by <code>aFieldName</code>, or <code>null</code> if no such field exist or if it's value can't be treated as a Date.
|
|
942
|
+
* @see #getDateFields(String)
|
|
943
|
+
* @since Sitevision 3.0
|
|
944
|
+
*/
|
|
945
|
+
getDateField(aFieldName: string): unknown;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* <p>The indexed contents as a list of Date values for a specified field.</p>
|
|
949
|
+
*
|
|
950
|
+
* <p>
|
|
951
|
+
* This method would typically be used for <em>multi-valued</em> Date fields. For a single-valued Date field, you would typically use
|
|
952
|
+
* {@link #getDateField(String)} instead.
|
|
953
|
+
* </p>
|
|
954
|
+
* @param aFieldName the name of the field.
|
|
955
|
+
* @return a list of Date values from the index field specified by <code>aFieldName</code>, or an <code>empty List</code> if no such field exist or no value can be treated as a Date.
|
|
956
|
+
* @see #getDateField(String)
|
|
957
|
+
* @since Sitevision 3.0.3
|
|
958
|
+
*/
|
|
959
|
+
getDateFields(aFieldName: string): unknown[];
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* <p>The indexed content as Float for a specified field.</p>
|
|
963
|
+
*
|
|
964
|
+
* <p>
|
|
965
|
+
* <strong>Note!</strong> This method returns the content as Float for the <em>first</em> field that matches <code>aFieldName</code>.
|
|
966
|
+
* </p>
|
|
967
|
+
* @param aFieldName the name of the field.
|
|
968
|
+
* @return the Float/content of the first index field specified by <code>aFieldName</code>, or <code>null</code> if no such field exist or if it's value can't be treated as a Float.
|
|
969
|
+
* @see #getFloatFields(String)
|
|
970
|
+
* @since Sitevision 3.0
|
|
971
|
+
*/
|
|
972
|
+
getFloatField(aFieldName: string): number;
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* <p>The indexed contents as a list of Float values for a specified field.</p>
|
|
976
|
+
*
|
|
977
|
+
* <p>
|
|
978
|
+
* This method would typically be used for <em>multi-valued</em> Float fields. For a single-valued Float field, you would typically use
|
|
979
|
+
* {@link #getFloatField(String)} instead.
|
|
980
|
+
* </p>
|
|
981
|
+
* @param aFieldName the name of the field.
|
|
982
|
+
* @return a list of Float values from the index field specified by <code>aFieldName</code>, or an <code>empty List</code> if no such field exist or no value can be treated as a Float.
|
|
983
|
+
* @see #getFloatField(String)
|
|
984
|
+
* @since Sitevision 3.0.3
|
|
985
|
+
*/
|
|
986
|
+
getFloatFields(aFieldName: string): unknown[];
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* <p>The indexed content as Long for a specified field.</p>
|
|
990
|
+
*
|
|
991
|
+
* <p>
|
|
992
|
+
* <strong>Note!</strong> This method returns the content as Long for the <em>first</em> field that matches <code>aFieldName</code>.
|
|
993
|
+
* </p>
|
|
994
|
+
* @param aFieldName the name of the field.
|
|
995
|
+
* @return the Long/content of the first index field specified by <code>aFieldName</code>, or <code>null</code> if no such field exist or if it's value can't be treated as a Long.
|
|
996
|
+
* @see #getLongFields(String)
|
|
997
|
+
* @since Sitevision 3.0
|
|
998
|
+
*/
|
|
999
|
+
getLongField(aFieldName: string): number;
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* <p>The indexed contents as a list of Long values for a specified field.</p>
|
|
1003
|
+
*
|
|
1004
|
+
* <p>
|
|
1005
|
+
* This method would typically be used for <em>multi-valued</em> Long fields. For a single-valued Long field, you would typically use
|
|
1006
|
+
* {@link #getLongField(String)} instead.
|
|
1007
|
+
* </p>
|
|
1008
|
+
* @param aFieldName the name of the field.
|
|
1009
|
+
* @return a list of Long values from the index field specified by <code>aFieldName</code>, or an <code>empty List</code> if no such field exist or no value can be treated as a Long.
|
|
1010
|
+
* @see #getLongField(String)
|
|
1011
|
+
* @since Sitevision 3.0.3
|
|
1012
|
+
*/
|
|
1013
|
+
getLongFields(aFieldName: string): unknown[];
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* <p>The encoded and highlighted content of a highlighted field.</p>
|
|
1017
|
+
*
|
|
1018
|
+
* <p>
|
|
1019
|
+
* <strong>Note!</strong> The result of this method is <em>always</em> escaped/encoded to XML entities so it won't interfere with the html
|
|
1020
|
+
* elements that surround the possible "highlighted" fragments!
|
|
1021
|
+
* </p>
|
|
1022
|
+
* @param aFieldName the name of the highlighted field.
|
|
1023
|
+
* @param maxNonHighlightedLength max length of the content that should be returned if no encoded highlighting result exists for given field. A value lower than 1 will be ignored (i.e. content will not be truncated).
|
|
1024
|
+
* @return an encoded string containing an highlighted excerpt - or an encoded excerpt of the field truncated lenient to <code>maxNonHighlightedLength</code>, or <code>null</code> if no such field exist.
|
|
1025
|
+
* @see #getHighlightedFields(String, int)
|
|
1026
|
+
* @since Sitevision 3.0
|
|
1027
|
+
*/
|
|
1028
|
+
getHighlightedField(
|
|
1029
|
+
aFieldName: string,
|
|
1030
|
+
maxNonHighlightedLength: number
|
|
1031
|
+
): string;
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* <p>The encoded and highlighted contents of a highlighted field.</p>
|
|
1035
|
+
*
|
|
1036
|
+
* <p>
|
|
1037
|
+
* This method would typically be used for <em>multi-valued</em> highlighted fields. For a single-valued highlighted field
|
|
1038
|
+
* (or if you only are interested in the largest highlighted value), you would typically use {@link #getHighlightedField(String, int)} instead.
|
|
1039
|
+
* No considerations are made regarding the field's type. The field values will be treated as strings.
|
|
1040
|
+
* </p>
|
|
1041
|
+
*
|
|
1042
|
+
* <p>
|
|
1043
|
+
* <strong>Note!</strong> The items in the result of this method is <em>always</em> escaped/encoded to XML entities so they won't interfere
|
|
1044
|
+
* with the html elements that surround the possible "highlighted" fragments!
|
|
1045
|
+
* </p>
|
|
1046
|
+
* @param aFieldName the name of the highlighted field.
|
|
1047
|
+
* @param maxNonHighlightedLength max length of the content for each item if no encoded highlighting result exists for given field. A value lower than 1 will be ignored (i.e. content will not be truncated).
|
|
1048
|
+
* @return a list of encoded strings, each containing an highlighted excerpt - or an encoded excerpt of the field truncated lenient to <code>maxNonHighlightedLength</code>, or <code>empty List</code> if no such field exist.
|
|
1049
|
+
* @see #getHighlightedField(String, int)
|
|
1050
|
+
* @since Sitevision 3.0.3
|
|
1051
|
+
*/
|
|
1052
|
+
getHighlightedFields(
|
|
1053
|
+
aFieldName: string,
|
|
1054
|
+
maxNonHighlightedLength: number
|
|
1055
|
+
): unknown[];
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* <p>The indexed content as string for a specified field, truncated to a lenient max size.</p>
|
|
1059
|
+
*
|
|
1060
|
+
* <p>
|
|
1061
|
+
* <strong>Note!</strong> Calling this method is is equivalent to calling
|
|
1062
|
+
* <code>SearchHit.getFieldTruncated(aFieldName, true, true, maxContentLength)</code>.
|
|
1063
|
+
* </p>
|
|
1064
|
+
*
|
|
1065
|
+
* <p>
|
|
1066
|
+
* <strong>Note!</strong> If the field is highlighted, use {@link #getHighlightedField(String, int)} instead.
|
|
1067
|
+
* </p>
|
|
1068
|
+
* @param aFieldName the name of the field.
|
|
1069
|
+
* @param maxContentLength max length of the content that should be returned. A value lower than 1 will be ignored (i.e. content will not be truncated).
|
|
1070
|
+
* @return the content of the index field with name <code>aFieldName</code> truncated so it contains at most <code>maxContentLength</code> characters, or <code>null</code> if no such field exist.
|
|
1071
|
+
* @see #getFieldTruncated(String, boolean, boolean, int)
|
|
1072
|
+
* @since Sitevision 2.7_06
|
|
1073
|
+
*/
|
|
1074
|
+
getFieldTruncated(aFieldName: string, maxContentLength: number): string;
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* <p>
|
|
1078
|
+
* The indexed content as string for a specified field, truncated (lenient or not) to a max size and an option to use first
|
|
1079
|
+
* or largest field if multiple fields match.
|
|
1080
|
+
* </p>
|
|
1081
|
+
*
|
|
1082
|
+
* <p>
|
|
1083
|
+
* <strong>Note!</strong> If the field is highlighted, use {@link #getHighlightedField(String, int)} instead.
|
|
1084
|
+
* </p>
|
|
1085
|
+
* @param aFieldName the name of the field.
|
|
1086
|
+
* @param useMaxCharsField whether the field that contains the most characters or the first field should be used if multiple fields match (i.e. <code>true</code> == use the matching field that contains most characters, <code>false</code> == use first matching field).
|
|
1087
|
+
* @param useLenientTruncation whether or not the truncation should be lenient. A value of <code>true</code> indicates that the truncation should be after the last complete word but less or equal to <code>maxContentLength</code> A value of <code>false</code> indicates that the truncation should be absolute, i.e. truncation is made at <code>maxContentLength</code> even if it cuts a word.
|
|
1088
|
+
* @param maxContentLength max length of the content that should be returned. A value lower than 1 will be ignored (i.e. content will not be truncated).
|
|
1089
|
+
* @return the content of the index field with name <code>aFieldName</code> truncated so it contains at most <code>maxContentLength</code> characters, or <code>null</code> if no such field exist.
|
|
1090
|
+
* @since Sitevision 2.7_06
|
|
1091
|
+
*/
|
|
1092
|
+
getFieldTruncated(
|
|
1093
|
+
aFieldName: string,
|
|
1094
|
+
useMaxCharsField: boolean,
|
|
1095
|
+
useLenientTruncation: boolean,
|
|
1096
|
+
maxContentLength: number
|
|
1097
|
+
): string;
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* The names of all fields available in this search hit.
|
|
1101
|
+
*
|
|
1102
|
+
* <p>
|
|
1103
|
+
* <em>Potentially also includes the Solr pseudo fields "score" and "[elevated]".</em>
|
|
1104
|
+
* </p>
|
|
1105
|
+
* @return a list of field names
|
|
1106
|
+
* @since Sitevision 3.5
|
|
1107
|
+
*/
|
|
1108
|
+
getFieldNames(): unknown;
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* The relative search score of the hit.
|
|
1112
|
+
*
|
|
1113
|
+
* <p>
|
|
1114
|
+
* The value ranges from 0 to 1 where 1 denotes the maximum score.
|
|
1115
|
+
* Note that the first hit does not necessarily has score 1, it is just the hit with the
|
|
1116
|
+
* highest relative score in the {@link SearchResult}.
|
|
1117
|
+
* </p>
|
|
1118
|
+
*
|
|
1119
|
+
* <p>
|
|
1120
|
+
* <em>
|
|
1121
|
+
* This method depends on availability of the Solr score pseudo field.
|
|
1122
|
+
* Search queries without that field will always return 0,
|
|
1123
|
+
* </em>
|
|
1124
|
+
* </p>
|
|
1125
|
+
*
|
|
1126
|
+
* <p>
|
|
1127
|
+
* <strong>Tip!</strong> Use this method to see the scores of your hits when debugging and tuning search field boost weights et al.
|
|
1128
|
+
* </p>
|
|
1129
|
+
* @return The relative search score for the search hit
|
|
1130
|
+
*/
|
|
1131
|
+
getScore(): number;
|
|
1132
|
+
|
|
1133
|
+
/**
|
|
1134
|
+
* Whether or not the search hit was elevated in the query result.
|
|
1135
|
+
*
|
|
1136
|
+
* <p>
|
|
1137
|
+
* <em>
|
|
1138
|
+
* This method depends on availability of the Solr [elevated] pseudo field.
|
|
1139
|
+
* Search queries without that field will always return false,
|
|
1140
|
+
* typically when custom fields (the Solr 'fl' param) is specified.
|
|
1141
|
+
* </em>
|
|
1142
|
+
* </p>
|
|
1143
|
+
* @return true if this search hit was elevated, false otherwise
|
|
1144
|
+
* @since Sitevision 4.2
|
|
1145
|
+
*/
|
|
1146
|
+
isElevated(): boolean;
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* <p>The type of <code>SearchHit</code> object.</p>
|
|
1150
|
+
* @return The type of the <code>SearchHit</code>. The value corresponds to any of the <code>TYPE</code> fields {@link #TYPE_INTERNAL}, {@link #TYPE_EXTERNAL},
|
|
1151
|
+
* @see #TYPE_INTERNAL
|
|
1152
|
+
* @see #TYPE_EXTERNAL
|
|
1153
|
+
*/
|
|
1154
|
+
getType(): number;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Returns a jQuery expression with a token that enables tracking of search hit clicks.
|
|
1158
|
+
*
|
|
1159
|
+
* <p>
|
|
1160
|
+
* Tracking search hits clicks is a helpful tool when analyzing if visitors seems to find interesting information in their search results.
|
|
1161
|
+
* Though, if the search result isn't really inited by the user (i.e. an A-Z listing or such), adding a click tracking callback is probably
|
|
1162
|
+
* not a good idea.
|
|
1163
|
+
* </p>
|
|
1164
|
+
*
|
|
1165
|
+
* <p>
|
|
1166
|
+
* A click tracking callback would typically be applied as value for the "onclick" and "onkeypress" attributes of a search hit link.
|
|
1167
|
+
* When rendering links to search hits with the {@link senselogic.sitevision.api.render.LinkRenderer}, apply the click tracking callback via
|
|
1168
|
+
* {@link senselogic.sitevision.api.render.LinkRenderer#setOnclick(String)}
|
|
1169
|
+
* </p>
|
|
1170
|
+
* @return a click tracking callback jQuery expression
|
|
1171
|
+
* @since Sitevision 3.0
|
|
1172
|
+
*/
|
|
1173
|
+
getClickTrackingCallback(): string;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
export default SearchHit;
|