https://wiki.zimbra.com/api.php?action=feedcontributions&user=Seanf&feedformat=atomZimbra :: Tech Center - User contributions [en]2024-03-29T10:09:41ZUser contributionsMediaWiki 1.39.0https://wiki.zimbra.com/index.php?title=Zimbra_Web_Client_Search_Tips&diff=10780Zimbra Web Client Search Tips2008-09-23T07:37:24Z<p>Seanf: Replaced "to do" type comment with some examples</p>
<hr />
<div>== Search language description ==<br />
<br />
Some type of query is always applied to produce the view that you see in the Zimbra interface.<br />
This topic describes in detail the search grammar used for Zimbra's Search feature & the most overlooked feature: The main search bar!<br />
<br />
* '''TIP''': You can set your General Options to ''''''Always show search string'''''' to see the current query in the Search toolbar. For example, when this option is set, clicking your Inbox folder shows the query string ''''''in:inbox''''''.<br />
*If you set the "Initial mail search:" to something besides in:inbox and upon login you will be taken to that folder/results first.<br />
<br />
=== Search Language Structure ===<br />
<br />
Simple searches can be done by just entering a word into the search field. Bare words (words without a search operator) are interpreted to search in the 'content:' operator -- this matches any text in the message.<br />
<br />
More advanced searches can be done by specifying a '''search operator'''. A search operator is a special keyword followed by a colon, followed by some other parameter specific to that operator. For example:<br />
* '''in:inbox''' the operator is "in" and the parameter is "inbox" - this returns messages which are in the folder named "inbox"<br />
* '''from:someone''' the operator is "from" and the parameter is "someone" - this returns messages which have the word "someone" in their email address<br />
<br />
You can prefix any keyword with the word "not" to specify items that do not have that criterion, for example '''not in:inbox'''.<br />
Search is case insensitive, meaning that "in:inbox" is the same as "in:Inbox". The minus sign ('''-''') is a synonym for '''NOT''' So: '''not in:inbox''' is the same as '''-in:inbox'''<br />
<br />
In most cases, it is not necessary to include punctuation-type characters in your search string, as these are ignored by the search code. There are certain times where this is not true (for example, searching for a time '9:30' in a message) and in those cases you should enclose the search parameter in quotation marks. For example: '''subject:"9:30"''' will return messages which have the string 9:30 in the subject.<br />
<br />
Allowable characters in the search parameter:<br />
* The following characters cannot be anywhere in a search parameter unless it is enclosed by quotes: ~ ' ! # $ % ^ & * ( ) _ ? / { }[ ] ; :<br />
* The following characters are allowed in a search parameter as long as they are not the first character: - + < ><br />
<br />
=== Multiple Search Terms ===<br />
<br />
If multiple search terms are entered (separated by spaces) they are ANDed together by default. '''in:inbox foo''' means "return me messages which are in the inbox AND which have the word foo in them". For searches using multiple criteria, you can either find items that match one of the specified criteria or all of them. You can perform both types of searches using the Advanced search builder in the UI.<br />
<br />
For all search panes other than the Basic search, the rules are:<br />
<br />
* Searching for messages that match any of the specified criteria is called an ''''OR'''' search, because if the message contains either X or Y, then it is considered a match. For Advanced search panes with multiple check boxes, making multiple selections within a single pane creates an ''''OR ''''search for those items.<br />
* Searching for messages that contain both X and Y is called an ''''AND'''' search, because the message must meet all the specified criteria in order to be considered a match. For Advanced server panes with check boxes, opening multiple instances of the same pane and making different check box selections in each one causes the criteria to be specified as an ''''AND'''' search.<br />
<br />
Only "OR" appears in a query. If you selected as an option to show the search query in the Search bar as you make selections in the Advanced search, the Search text box updates to show the resulting query. With the ''''AND'''' type of search, the word ''''AND'''' does not appear.<br />
<br />
'''Tip''': Using parenthesis with AND and OR. Words within parentheses are considered as a unit. For example '''from: (john thomas)''' is equivalent to '''from:john AND from:thomas'''. If you use OR in the parenthesis, '''from:(john or smith)''', the search is for results '''from:john OR from:thomas'''.<br />
<br />
=== Using '''*''' as a wildcard in Search ===<br />
<br />
The asterisk ('''*''') can be used as a wildcard in a search to find content that contains words that have similar spellings. <br />
<br />
Use the asterisk '''*''' as a wildcard after a prefix. For example, the search string '''do*''' returns items such as ''do'', ''dog'', ''door'', etc.<br />
<br />
==Keyword Descriptions and Examples==<br />
<br />
'''content:''' Specifies text that the message must contain. For example, <span class="code">content:bananas</span> finds all items containing the word "bananas".<br />
<br />
'''from:''' Specifies a sender name or email address that is in the From header. This can be text, as in "John Smith III", an email address such as "joe@acme.com", or a domain such as "@zimbra.com".<br />
<br />
'''to:''' Same as from: except that it specifies one of the people to whom the email was addressed in the To: header.<br />
<br />
'''cc:''' Same as from: except that it specifies a recipient in the Cc: header of the message.<br />
<br />
'''subject:''' Specifies text that must appear in the subject header of the message. An example might be <span class="code">subject:"new vacation policy"</span>. Use quotes to search for exact match.<br />
<br />
'''in:''' Specifies a folder. For example, <span class="code">in:sent</span> would show all items in your ''''''Sent'''''' folder.<br />
<br />
'''under:''' Specifies searching a folder and it's sub-folders.<br />
<br />
'''has:''' Specifies an attribute that the message must have. The types of object you can specify are "attachment", "phone", or "url". For example, <span class="code">has:attachment</span> would find all messages which contain one or more attachments of any type.<br />
<br />
'''filename:''' Specifies an attachment file name. For example,<span class="code"> filename:query.tx</span>t would find messages with a file attachment named "query.txt".<br />
<br />
'''type:''' Specifies a search within attachments of a specified type. The types of attachment you can specify are "text", "word", "excel", and "pdf". For example, <span class="code">type:word "hello"</span> finds messages with attachments that are Microsoft Word documents and searches within those attachments for the word "hello".<br />
<br />
'''attachment:''' Specifies any item with a certain type of attachment. For example, <span class="code">attachment:word</span> would find all messages with Word attachments.<br />
<br />
'''is:''' Searches for messages with a certain status - for example, <span class="code">is: unread</span> will find all unread messages. Allowable values are "unread", "read", "flagged", "unflagged", "sent", "draft", "received", "replied", "unreplied", "forwarded", unforwarded", "anywhere", "remote" (in a shared folder), "local", "sent", "invite", "solo" (no other messages in conversation), "tome", "fromme", "ccme", "tofromme". "fromccme", "tofromccme" (to, from cc me, including my aliases)<br />
<br />
'''date:''' Use this keyword to specify a date, using the format that is default for your browser's locale (for US English the format is mm/dd/yyyy). For example, <span class="code">date:2/1/2007</span> would find messages dated February 1, 2007. The greater than (>) or less than (<) symbols can be used instead of ''after'' or ''before''. >= and <= are also allowed.<br />
<br />
'''after:''' Specifies mail sent after a certain date. For example, after:2/1/2007 specifies mail sent after February 1, 2007.<br />
<br />
'''before:''' Same as <span class="code">after:</span> except specifies mail sent before the specified date.<br />
<br />
'''size:''' Specifies messages whose total size, including attachments, is a specified number of bytes, kilobytes, or megabytes For example, <span class="code">size:12 kb</span> would find messages that are exactly 12K in size. The greater than (>) or less than (<) symbols can be used instead of bigger or smaller.<br />
<br />
'''larger:''' Similar to size: except specifies greater than the specified size.<br />
<br />
'''smaller:''' Similar to size: except specifies smaller than the specified size.<br />
<br />
'''tag:''' Finds messages which have been tagged with a specified tag. For example,<span class="code"> tag:amber</span> will find message that have a tag called "amber" applied.<br />
<br />
<br />
==Raw List of Search Parameters==<br />
<br />
content:{TEXT}<br />
<br />
to:{TEXT|EMAIL_ADDR|DOMAIN}<br />
<br />
from:[>,<,>=,<=]{TEXT} OR {EMAIL_ADDR} OR {DOMAIN}<br />
<br />
cc:{TEXT|EMAIL|DOMAIN}<br />
<br />
tofrom,tocc,fromcc,tofromcc -> equivalent to combinations like (to:X or from:X), etc<br />
<br />
envto:{TEXT|EMAIL_ADDR|DOMAIN} // x-envelope-to mime header<br />
<br />
envfrom:{TEXT|EMAIL|DOMAIN} // x-envelope-from mime-header<br />
<br />
subject:[>,<,>=,<=]{TEXT}<br />
<br />
in:{FOLDER_LABEL}<br />
<br />
under:{FOLDER_LABEL}<br />
<br />
has:{"attachment"|OBJECT_TYPE}<br />
<br />
filename:{FILENAME}<br />
<br />
type:{RAW_MIME_TYPE|FRIENDLY_MIME_TYPE}<br />
<br />
attachment:{RAW_MIME_TYPE|FRIENDLY_MIME_TYPE}<br />
<br />
<br />
item:{"all"|"none" -- all items, or no-item<br />
<br />
| [0-9]+ --> item ID<br />
<br />
|"{[0-9]+(,\s?[0-9]+)*}" -- ie {1,2,3} or {1} --> set of item_id's<br />
<br />
<br />
is:{"anywhere"|"unread"|"read"|"flagged"|"unflagge d"|"sent"|"received"|"replied"|<br />
"unreplied"|"forwarded"|"unforwarded"|"invite" |<br />
<br />
"solo"| // no other messages in conversation<br />
<br />
"tome"|"fromme"|"ccme"|"tofromme"|"fromccme"|"tofr omccme" // to, from cc me, including my aliases<br />
<br />
"local" - matches all folders in the local mailbox (that the user has READ access to)<br />
<br />
"remote" - matches all remotely mounted folders (that the user has READ access to)<br />
}<br />
<br />
<br />
date:[>,<,>=,<={DATE}<br />
<br />
appt-start:[>,<,>=,<={DATE}<br />
<br />
appt-end:[>,<,>=,<={DATE}<br />
<br />
after:{DATE}<br />
<br />
before:{DATE}<br />
<br />
size:{SIZE}<br />
<br />
larger:{SIZE}<br />
<br />
smaller:{SIZE}<br />
<br />
tag:{TAG}<br />
<br />
modseq:[>,<,>=,<={CHANGE_ID}<br />
<br />
my:{MY_SAVED_SEARCH_NAME} (UNIMPLEMENTED)<br />
<br />
message:{DB_MSG_ID}<br />
<br />
conv:{DB_CONV_ID}<br />
<br />
* conv-count:{NUM}<br />
<br />
* conv-minm:{NUM}<br />
<br />
* conv-maxm:{NUM}<br />
<br />
* conv-start:{DATE}<br />
<br />
* conv-end:{DATE}<br />
<br />
author:{TEXT}<br />
<br />
title:{TEXT}<br />
<br />
keywords: {TEXT}<br />
<br />
company: {TEXT}<br />
<br />
metadata: {TEXT}<br />
<br />
contact: {TEXT} // special-case searching for contact picker (matches type=contact documents only)<br />
<br />
msgid: {TEXT} // Message-Id: field from mime header<br />
<br />
sortscore|dateasc|datedesc|subjasc|subjdesc|name asc|namedesc)<br />
-- overrides the sort field specified in the <SearchRequest><br />
<br />
FRIENDLY_MIME_TYPE:"text"|"application"|"word"|"ms word"|"excel"|"xls"|"ppt"|"pdf"|"ms-tnef"|"image"|"jpeg"|"gif"|"bmp"|"none"|"any"<br />
<br />
TEXT: text string, must be in "'s if has spaces in it<br />
<br />
EMAIL_ADDR: text string, no spaces, with @ sign<br />
<br />
DOMAIN: such as *.com<br />
<br />
FOLDER_LABEL: mail|trash|spam|anywhere<br />
<br />
TAG: tag_name<br />
OBJECT_TYPE: "phone" "url" "credit-card" etc...types of parsed objects<br />
<br />
DATE: absolute-date = mm/dd/yyyy | yyyy/dd/mm OR<br />
<br />
relative-date = [+/-]nnnn{minute,hour,day,week,month,year}<br />
<br />
(eg "this week" is '''date:-0week''', "last week" is '''date:-1week''', "this month" is '''date:-1month''', etc.)<br />
<br />
SIZE: ([<>])?n+{b,kb,mb} // default is b<br />
<br />
DB_MSG_ID: ??<br />
<br />
NUM: ([<>])?n+<br />
<br />
search by folder ID inid:folderID<br />
<br />
=== Query.txt dump ===<br />
<pre><br />
content:{TEXT}<br />
<br />
to:{TEXT|EMAIL_ADDR|DOMAIN}<br />
<br />
from:[>,<,>=,<=]{TEXT} OR {EMAIL_ADDR} OR {DOMAIN} <br />
<br />
cc:{TEXT|EMAIL|DOMAIN}<br />
<br />
tofrom,tocc,fromcc,tofromcc -> equivalent to combinations like (to:X or from:X), etc<br />
<br />
envto:{TEXT|EMAIL_ADDR|DOMAIN} // x-envelope-to mime header<br />
<br />
envfrom:{TEXT|EMAIL|DOMAIN} // x-envelope-from mime-header <br />
<br />
subject:[>,<,>=,<=]{TEXT}<br />
<br />
in:{FOLDER_LABEL} // search in a specific folder<br />
<br />
under:{FOLDER_LABEL} // in specified folder AND ALL SUBFOLERS<br />
<br />
has:{"attachment"|OBJECT_TYPE}<br />
<br />
filename:{FILENAME}<br />
<br />
type:{RAW_MIME_TYPE|FRIENDLY_MIME_TYPE}<br />
<br />
attachment:{RAW_MIME_TYPE|FRIENDLY_MIME_TYPE}<br />
<br />
item:{"all"|"none" -- all items, or no-item<br />
<br />
| [0-9]+ --> item ID<br />
<br />
|"{[0-9]+(,\s?[0-9]+)*}" -- ie {1,2,3} or {1} --> set of item_id's<br />
<br />
is:{"anywhere"|"unread"|"read"|"flagged"|"unflagged"|"sent"|"received"|"replied"|<br />
<br />
"unreplied"|"forwarded"|"unforwarded"|"invite"|<br />
<br />
"solo"| // no other messages in conversation<br />
<br />
"tome"|"fromme"|"ccme"|"tofromme"|"fromccme"|"tofromccme" // to, from cc me, including my aliases<br />
<br />
"local" - matches all folders in the local mailbox (that the user has READ access to)<br />
<br />
"remote" - matches all remotely mounted folders (that the user has READ access to)<br />
<br />
} <br />
<br />
date:[>,<,>=,<={DATE}<br />
<br />
appt-start:[>,<,>=,<={DATE} <br />
<br />
appt-end:[>,<,>=,<={DATE} <br />
<br />
after:{DATE}<br />
<br />
before:{DATE}<br />
<br />
size:{SIZE}<br />
<br />
larger:{SIZE}<br />
<br />
smaller:{SIZE}<br />
<br />
tag:{TAG}<br />
<br />
modseq:[>,<,>=,<={CHANGE_ID}<br />
<br />
my:{MY_SAVED_SEARCH_NAME} (UNIMPLEMENTED)<br />
<br />
message:{DB_MSG_ID}<br />
<br />
conv:{DB_CONV_ID}<br />
<br />
* conv-count:{NUM}<br />
<br />
* conv-minm:{NUM}<br />
<br />
* conv-maxm:{NUM}<br />
<br />
* conv-start:{DATE}<br />
<br />
* conv-end:{DATE}<br />
<br />
author:{TEXT}<br />
<br />
title:{TEXT}<br />
<br />
keywords:{TEXT}<br />
<br />
company:{TEXT}<br />
<br />
metadata:{TEXT}<br />
<br />
contact:{TEXT} // special-case searching for contact picker (matches type=contact documents only)<br />
<br />
msgid:{TEXT} // Message-Id: field from mime header<br />
<br />
<br />
<br />
// Structured-Data search operator (see below):<br />
<br />
field[FIELDNAME]:{TEXT} or #FIELDNAME:{TEXT}<br />
<br />
<br />
<br />
sort:(score|dateasc|datedesc|subjasc|subjdesc|nameasc|namedesc)<br />
<br />
-- overrides the sort field specified in the <SearchRequest> <br />
<br />
<br />
<br />
* : not currently supported<br />
<br />
<br />
<br />
FRIENDLY_MIME_TYPE:"text"|"application"|"word"|"msword"|"excel"|"xls"|"ppt"|"pdf"|"ms-tnef"|"image"|"jpeg"|"gif"|"bmp"|"none"|"any"<br />
<br />
TEXT: text string, must be in "'s if has spaces in it<br />
<br />
EMAIL_ADDR: text string, no spaces, with @ sign<br />
<br />
DOMAIN: such as *.com<br />
<br />
FOLDER_LABEL: mail|trash|spam|anywhere<br />
<br />
TAG: tag_name<br />
<br />
OBJECT_TYPE: "phone" "url" "credit-card" etc...types of parsed objects<br />
<br />
DATE: absolute-date = mm/dd/yyyy | yyyy/dd/mm OR<br />
<br />
relative-date = [+/-]nnnn{minute,hour,day,week,month,year}<br />
<br />
(need to figure out how to represent "this week", "last<br />
<br />
week", "this month", etc)<br />
<br />
SIZE: ([<>])?n+{b,kb,mb} // default is b<br />
<br />
DB_MSG_ID: ??<br />
<br />
NUM: ([<>])?n+<br />
<br />
<br />
----------------------------------------<br />
<br />
<br />
Fields<br />
<br />
--------<br />
<br />
content-related<br />
<br />
<br />
<br />
content: # this should be the default field<br />
<br />
<br />
header-related<br />
<br />
<br />
from:<br />
<br />
to:<br />
<br />
cc:{name|domain}<br />
<br />
subject:<br />
<br />
<br />
<br />
<br />
saved-search-related: (UNIMPLEMENTED)<br />
<br />
<br />
<br />
my:{name-of-saved-search}<br />
<br />
<br />
<br />
i.e., could have a saved search of "domain:example.zimbra.com"<br />
<br />
called "zimbra" and say:<br />
<br />
<br />
<br />
my:zimbra<br />
<br />
<br />
<br />
object-related fields:<br />
<br />
<br />
<br />
has:attachment constrains search to messages with attachments<br />
<br />
has:{phone|url|ssn|po...} messages with "objects" <br />
<br />
<br />
<br />
<br />
mime-related<br />
<br />
<br />
<br />
filename:{file-name} constrains search to messages with attachments of given name<br />
<br />
type:{mime-type} constrains search to blobs of the given type<br />
<br />
attachment:{mime-type} constrains search to messages with attachments of the given type<br />
<br />
<br />
<br />
mime-type = raw-mime-type | mime-type-alias<br />
<br />
raw-mime-type = type/sub-type (i.e., text/plain)<br />
<br />
# aliases are "user-friendly" mime types<br />
<br />
mime-type-alias = "word" | "excel" | "pdf", "image", "audio", etc...<br />
<br />
<br />
<br />
EXAMPLES: <br />
<br />
type:word "hello" searches within only words docs for "hello"<br />
<br />
attachment:word "hello" searches within messages that have word docs for "hello"<br />
<br />
attachment:image/* matches all messages that have image attachments<br />
<br />
<br />
<br />
<br />
flags<br />
<br />
<br />
<br />
is:anywhere --> in any folder (overrides spam-trash setting for that query part)<br />
<br />
note that "is:anywhere" does NOT imply "across all mountpoints". Mountpoints must<br />
<br />
be explicitly included with an "in:" term -- in:mountpointname.<br />
<br />
is:unread<br />
<br />
is:read<br />
<br />
is:flagged<br />
<br />
is:unflagged<br />
<br />
is:sent<br />
<br />
is:received<br />
<br />
is:invite<br />
<br />
is:solo --> true if the item has no conversation <br />
<br />
<br />
<br />
The flag name can also be used in a search:<br />
<br />
tag:\{FlagName} where {FlagName} is one of the following values:<br />
<br />
Attached, Answered, Copied, Deleted, Draft, Flagged, Forwarded, Notified, Subscribed, Unread<br />
<br />
<br />
<br />
date-related fields<br />
<br />
<br />
<br />
after:{date}<br />
<br />
before:{date}<br />
<br />
date = {absolute-date} | {relative-date}<br />
<br />
<br />
<br />
absolute-date = mm/dd/yyyy | yyyy/dd/mm<br />
<br />
<br />
<br />
relative-date = [+/-]nnnn{minute,hour,day,week,month,year} <br />
<br />
<br />
<br />
NOTE: need to figure out how to represent "this week", "last week", "this month", etc. probably<br />
<br />
some special casing of relative dates and use with after/before. i.e., maybe "after:-2d AND before:0d" means<br />
<br />
yesterday? i.e., for relative day/week/month/year, you zero out month/week/day/hour/minute?<br />
<br />
<br />
<br />
last 4 hours: after:-4hour <br />
<br />
today: after:0day<br />
<br />
yesterday: (after:-2day AND before:0day)<br />
<br />
this week: after:0week<br />
<br />
last week: (after:-2week AND before:0week)<br />
<br />
this month: after:0month<br />
<br />
last month: (after:-2month AND before:0month)<br />
<br />
this year: after:0year<br />
<br />
last year: (after:-2year AND before:0year)<br />
<br />
last year and older: before:0year<br />
<br />
<br />
<br />
appointment search operators<br />
<br />
----------------------------<br />
<br />
appt-start: appt-end:<br />
<br />
Search based on the start and end times of the appointment.<br />
<br />
For non-recurring appointments, this is basically what you<br />
<br />
expect. For recurring appointments, the start and end times are<br />
<br />
the *earliest possible* time (start of the first instance in the<br />
<br />
recurrence) and *latest possible* time, or sometime in 2099 if<br />
<br />
the recurrence has no end.<br />
<br />
<br />
<br />
<br />
<br />
size-releted fields<br />
<br />
<br />
<br />
larger:{size}<br />
<br />
smaller:{size}<br />
<br />
size:{size}<br />
<br />
<br />
<br />
size is [<>]nnnn{b,kb,mb,gb} # default is kb?<br />
<br />
<br />
<br />
<br />
tag-related fields<br />
<br />
<br />
<br />
tag:{user-defined-tag}<br />
<br />
<br />
<br />
<br />
<br />
domain-related fields<br />
<br />
<br />
<br />
domain:{domain-list}<br />
<br />
EXAMPLES: domain:stanford.edu OR: domain:*.org<br />
<br />
<br />
<br />
<br />
db-related fields<br />
<br />
<br />
<br />
message:{db-message-id} # constrain searches to a particular message<br />
<br />
<br />
<br />
<br />
conversation-related-fields: <br />
<br />
conv:{db-conv-id} # constrain searches to a paritcular conversation<br />
<br />
* conv-min-count:{num} # constrain searches to conversations of a particular length<br />
<br />
* conv-max-count:{num} # constrain searches to conversations of a particular length<br />
<br />
conv-start:{date}<br />
<br />
conv-end:{date}<br />
<br />
<br />
<br />
metadata-related fields<br />
<br />
<br />
<br />
author:<br />
<br />
title:<br />
<br />
keywords:<br />
<br />
company:<br />
<br />
metadata:<br />
<br />
<br />
<br />
The metadata fields refer to the metadata of a non-textual attachment.<br />
<br />
The fields author, title, keywords, company refer to the metadata fields <br />
<br />
of the same name in the document.<br />
<br />
The field metadata aggregates all the metadata fields including the above four.<br />
<br />
E.g.,<br />
<br />
author:acme finds all attachments whose author is acme<br />
<br />
metadata:acme finds all attachments where acme appears in any metadata<br />
<br />
fields, including author.<br />
<br />
<br />
<br />
misc fields<br />
<br />
<br />
<br />
* minm:nnnn # constrain to conversations with at least nnnn messages<br />
<br />
* maxm:nnnn # constrain to conversations with at most nnnn messages<br />
<br />
<br />
<br />
<br />
<br />
other-mime-specific fields<br />
<br />
<br />
<br />
how do we want to handle doc properties from word, pdf, mp3, etc?<br />
<br />
<br />
<br />
i.e.:<br />
<br />
genre:rock OR artist:rush<br />
<br />
title:"customer visit"<br />
<br />
keywords:security<br />
<br />
author:ross<br />
<br />
<br />
<br />
* maybe {mime-type-alias}.field? i.e.:<br />
<br />
<br />
<br />
audio.genre:rock OR audio.artist:rush (or mp3.*?)<br />
<br />
word.title:hello<br />
<br />
<br />
<br />
where the mime-type-alias can be left off if field is non-ambigious?<br />
<br />
<br />
<br />
do we want to try and promote certain fields that we can share between mulitple types? (title, author, keywords)<br />
<br />
<br />
<br />
<br />
Structured-Data Searching<br />
<br />
--------------------------------<br />
<br />
Search/Indexing now has the ability to analyze and store data in<br />
<br />
Name-Value pairs in such a way that they can be searched for in a<br />
<br />
structured way by the query language.<br />
<br />
<br />
<br />
For example, Contact name-value pairs are indexed this way.<br />
<br />
<br />
<br />
Structured data is stored in the "l.field" lucene field, and it should be added to the index document in a format like this: <br />
<br />
"fieldOne:value1 value2 value3 value4\nFieldTwo:value2 value3 value4"<br />
<br />
<br />
<br />
The search language has been extended to allow field searches to be expressed like this:<br />
<br />
#FieldName:value<br />
<br />
<br />
<br />
For example, to find a contact with the last name "Davis" you would use a search query like:<br />
<br />
#lastname:davis<br />
<br />
OR<br />
<br />
FIELD[lastname]:davis<br />
</pre></div>Seanf