index > Windows Desktop Search Development > URL Field encoding in 2.6.5?

URL Field encoding in 2.6.5?

Hi, I've submitted this again as it may be hidden in the other thread, plus is very important to me as to whether I continue to try to use WDS 2.6.5 as part of my product. I need to make that decision pretty soon to ship on time. Thanks for any help - even if it's just a 'We are trying to find out, hang on a week...'

From my app I do a search on Outlook emails via the COM API.

In the resultset I get back I need to be able to display the item in Outlook using the StoreId and EntryId values. I can get the Store Id from the first part of the URL field. The EntryId used to be readable, but now, for storage size savings I imagine, it's been encoded.

What is the special encoding of the URL column now?

I wasn't that worried too much before, because the entryID was used by 2.5 to be included in the 'Filename' column too, but by the looks of 2.6.5 it's now been blanked out to '...'! i.e. see thread here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=293242&SiteID=1

I checked that the URL end-part is not a straight UNICODE conversion, so what do I use? I don't mind if this is even a temporary solution, so any clues/hints would be greatly appreciated.

Any help with this really appreciated - I am trying to promote the use of latest WDS afterall? :-)

David Ing

Hi David,

Let me look into this for you. Given your time considerations I'll do my best in getting a quick answer.

Thanks,

Bill Connors

Program Manager, Windows Desktop Search - Communities




WDS Communities PM
Bill Connors MS

The end of the url is the entryid, but to save space we now encode it.

The decoding algorythmn looks like this:

void CEntryId::FromString(__in CString &strEIDU)
{

//----------- Decode with YEncode like algorythm -------
// decode using pseudo YENC encoding, everything is shifted up by 0x30 starting it at the '0' letter.
// Things that wrap have an escape '!' followed by a 0x60 to put it back up to '0' letter range
LPCWSTR pszSrc = strEIDU;

// the first WCHAR is the length of the buffer
m_cBytes = *pszSrc++ - 0x30;

// add 2 to the size of the buffer since we assume an odd buffer size could lead to a byte being assigned after
// the size of the buffer. This is a side-effect of the way we are encoding the buffer
AllocateBuffer(m_cBytes+2);

ATLASSERT(m_pEntryId != NULL);

if (m_pEntryId != NULL)
{
// output is to allocated buffer
LPWSTR pszDest = (LPWSTR)m_pEntryId;

// for each WCHAR in unicode string,
int Len = strEIDU.GetLength();

// (start at position 1 because the zeroth WCHAR is actually the # of bytes in EID)
for(int i=1; i < Len; i++)
{
int offset = 0x30;

// if it's an escaped char
if (*pszSrc == L'!')
{
// skip escape char
pszSrc++;
i++;

// offset is now 60
offset = 0x60;
}
// restore current WCHAR
*pszDest++ = (WCHAR)(((ULONG)*pszSrc + 0x10000) % 0x10000) - offset;

// advance to next position
pszSrc++;

ATLASSERT((DWORD)((LPBYTE)pszDest - (LPBYTE)m_pEntryId) <= (DWORD)(m_cBytes+2));
}
}
}




Dev Lead MSN Deskop Search
Tom Laird-McConnell

Thank you Tom - that's just what I needed. I appreciate the info.

Bill - thanks for following this up.

- David




David
David Ing
reply 4

You can use google to search for other answers

 

More Articles

• Onenote search results only shown as empty, numbered pages with O...
• Feature Request
• How to Add snap-in into Adminstrative Tools
• #msntb_toolbar_full_name#
• are there any commands that can be given to the indexer?
• Hit-highlighting in text files - possible?
• Context indexing limitations
• no search results
• WDS 3.0 Beta 2 Desktop Search Box crash
• V.slow after installing WDS
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• I can't type in the IE address bar
• Hotkey assignment
• WDS - Deskbar - Ver 2.6.5 Issue
• Using existing IFilters in WDS protocol
• Is there a way to setup SSL enabling on
• Forum for Vista Windows Search APIs?
• Protocol Handler startup problems
• Access the index status through the API
• WDS never finishes indexing
• Address bar does not work
• WDS and Outlook 2000 crashing on exit is
• How to kill a process that is not even l
• What's the name of the 'Preview Text' co
• Ho do I pass a query to a running instan
• Microsoft Excel 2007 beta (Visual Basic

Hot Articles

• WDS 2.6.5 build 5378 searching inop
• Problem crawling with a hierarchical cus
• New mail notifications in subfolders
• un named error when turing on the window
• Windows Desktop Search - Network Drive
• Protocol Handlers in WDS 3
• WDS not indexing email
• Any Fixes for Roaming Profiles with WDS
• Problem with WDS Filter
• WDS Shutdown Issues
• Windows Vista Search Compared to Windows
• WDS 2.6 EID Encoding
• Natural Language
• Moving to Vista
• Address bar lost!

Recommend Articles

• WDS OleDB provider problem
• Word Add-In creates problems with Deskto
• SIMPLE instructions to REMOVE Windows De
• URL Field encoding in 2.6.5?
• no search results
• Address bar does not work
• WDS 3.0 beta
• Do I need to create a new store?
• WDS and defaul Outlook profile
• WDS 3.0 Beta 2 doesn't index NTFS juncti
• Registration problem with Microsoft Outl
• I can't type in the IE address bar
• Multiple user sharing same index on a pc?
• Feature Request: Improved Preview with s
• Email Notifications from Windows 2000