You are here: C++ Support Classes > dtSearch Namespace > Classes > DSearchResults Class > DSearchResults::UrlEncodeItem Method
Close
dtSearch Text Retrieval Engine Programmer's Reference
DSearchResults::UrlEncodeItem Method
Syntax
C++
static void UrlEncodeItem(dtsSearchResultsItem& item, DString& dest, ptrdiff_t maxLen, const char * indexId = 0);
Parameters
Description
dtsSearchResultsItem& item
The search results item to encode
DString& dest
String buffer to receive encoded item
ptrdiff_t maxLen
Maximum length of the string to generate
const char * indexId = 0
Optional value to replace the index path in the generated URL
If indexId is provided, it will be stored in the URL in the form ixid=indexId, and the value provided for indexId will be URL-encoded.

URL-encode an item in search results. An item is url-encoded by storing the index path, document id, and hit offsets. Some browsers and web servers are unable to handle very long URLs, so the string generated should be limited, using the maxLen parameter, to 1024 characters.

Copyright (c) 1995-2021 dtSearch Corp. All rights reserved.