SharePoint Search Query Syntax

 1. LIKE VALUE
WHERE <column> LIKE <wildcard_literal>
%,_,[ ],[^ ]
Usage:-

comp%r matches “comp” followed by zero or more of any characters, ending in an “r”.

comp_ter matches “comp”  followed by exactly one of any character, followed by “ter”.

comp[a-z]re matches “comp” followed by a single character in the range of lowercase a through lowercase z, followed by “re”.

comp[ao] matches “comp” followed by a single character that must be either a lowercase a or a lowercase o

comp[^u] matches “comp” followed by any single character that is not a lowercase u.

2. LITERAL VALUE
WHERE <column> <comp_op> <literal>
=,!=,<>,>=,=<,<
WHERE MetaDataProperty = FALSE

3. NULL Predicate
WHERE <column> IS [NOT] NULL

WHERE Title IS NULL

4. DATE FUNCTION
DATEADD (DateTimeUnits, OffsetValue, DateTime)
WHERE LastModifiedTime <=DATEADD (DAY, -5, GETGMTDATE())
WHERE LastModifiedTime <=DATEADD (DAY, -2, DATEADD (HOUR, -4, GETGMTDATE()))
This can be one of  YEAR,QUARTER,MONTH,WEEK,DAY,HOUR,MINUTE,SECOND
Note : This value is case-sensitive.

5. ORDER BY
ORDER BY <column> [<direction>] [,<column> [<direction>]]
…ORDER BY A ASC, B, C, D DESC, E, F, G ASC

6. FREETEXT
WHERE FREETEXT('computer software hardware')
WHERE FREETEXT(DEFAULTPROPERTIES, 'hardware store -computer')
   Note:search terms "hardware" and "store", and do not contain the search term "computer".
7. CONTAINS
WHERE CONTAINS ('computer')
WHERE CONTAINS ('computer software')
WHERE CONTAINS ('"compu*"')
WHERE CONTAINS ('computer' AND 'software')
WHERE CONTAINS ('computer' NEAR 'software')
8. Search URL Syntax
k=Keyword
s=Scope
v=relevance or date
start=Page number
Known Issues

1. Like statement is limited to 64 characters

2. Path managed property. In you case just do CONTAINS(Path,’http://servername/sitename/listname/folder‘).”

Advertisements

How to Configure Search For SSL enable Site

If SharePoint site is SSL enabled (https://mukeshdemo.com) then SharePoint search will not give any result.
Log will give following error.

(The secure sockets layer (SSL) certificate sent by the server was
  invalid  and this item will not be crawled.)

Solution: Extend the site and change the Alternate Access Mapping accordingly.

Also in  Central Admin –>  Application Management –> Manage Search Services –>  Ignore SSL certificate warning