Searching for values in a specific field using REST Search

To conduct a Search using REST...you only have the querytext parameter which searches all fields. How can I search within a specific field using REST?
Brian

You can use the following code as an example to post a query. The example shows how to search against the title managed property. It also shows you how to bring back certain properties for viewing and refiners. You can also do the same with a GET.
function executeRESTSearch() {
var appweburl = _spPageContextInfo.webAbsoluteUrl;
$.ajax(
'url': appweburl + "/_api/search/postquery",
'method': 'POST',
'data': JSON.stringify({
'request': {
'__metadata': {
'type': 'Microsoft.Office.Server.Search.REST.SearchRequest'
'Querytext': 'title:whatever',
'Refiners': 'title,created',
'SelectProperties': { 'results': ['created','path'] },
'SortList': {
'results': [{
'__metadata': {
'type': 'Microsoft.SharePoint.Client.Search.Query.Sort'
'Direction': 1,
'Property': 'created'
'headers': {
'accept': 'application/json;odata=verbose',
'content-type': 'application/json;odata=verbose',
'X-RequestDigest': $('#__REQUESTDIGEST').val()
'success': function (data) {
var d = data.d.postquery.PrimaryQueryResult.RefinementResults.Refiners.results[0].Entries.results[0].RefinementValue;
'error': function (err) {
alert(JSON.stringify(err));
http://msdn.microsoft.com/en-us/library/office/jj163876(v=office.15).aspx
Blog | SharePoint Field Notes Dev Tools |
SPFastDeploy | SPRemoteAPIExplorer

Similar Messages

  • How do i search for a photo album when i use the search facility on my iPad or iPhone it will not find photo albums of a given name can anyone help

    how do i search for a photo album when i use the search facility on my iPad or iPhone it will not find photo albums of a given name can anyone help

    Photo albums are not searched by Spotlight Search.  Go to Settings > General > Spotlight Search to see and reorder the available search items.
    For more details, see page 12 of the iPad iOS 5.1 User Guide

  • Search for multiple words in a field?

    is there a way to search for multiple words in a field? for example, if i have a metadata field called NOTES that contains the string "Joe and Bob created this version on Sunday" is there a way to search for "Sunday, Joe, Bob" and have it return the asset?

    Search using the "Matches Word" option instead of "Contains". That will limit your results to only assets that have a field value that includes all three of those terms. If they are not all included in the same field value, it will not return a hit. So if "Sunday" were in Keywords and "Joe" & "Bob" are in Notes, you would not get a hit for that search with "Matches Word".
    "Contains" searches for the contiguous string in any field on the assets.
    Further, if you add your Notes field to the Metadata Group "Asset Filter", it will appear in your advanced search options, asset subscription filters, and search expired responses. Then you can specifically limit the search to that field and choose from "Matches Word', "Contains", and several other search filters. Note that when you use "Matches Word" this way, you need to eliminate spaces from your comma delimited list of words or you will not get the search hits you want.

  • Sorting on specific  field using XSLT Mapping

    Hi All,
    I am trying to sort the records on specific field using XSLT mapping.But I'm unable get the proper output for the following code.
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://xxxxxxxx">
    <xsl:output method="xml" indent="yes" />
         <xsl:template match="/">
              <a:T1>
                   <Row>
                             <xsl:for-each select="a:S1/Record">
                             <xsl:sort select="EmpID" />
                             <EMPID>
                                  <xsl:value-of select="EmpID"/>
                             </EMPID>
                             <ENAME>
                                  <xsl:value-of select="EmpName"/>
                             </ENAME>
                        </xsl:for-each>
                        </Row>
              </a:T1>
         </xsl:template>
    </xsl:stylesheet>>
    Currently getting following output :
    http://www.flickr.com/photos/21390012@N04/2074799747/
    Expected output should be like below :
    http://www.flickr.com/photos/21390012@N04/2074807393/
    Kindly send me suggestion to achieve this.
    Regards
    Pullarao

    Hi ,
    I donno much about srting in XSLT but i can give you one example on that.
    Example :
    This is how to sort numbers in xslt.
    Try this :
    <xsl:for-each select="learn[@kind='done']">
         <xsl:sort select="number(@rank)" data-type="number"/>
         <table border="00" cellpadding="3" width="100%">
                   <tr>
                        <td width="100" valign="top" align="right"><input type="checkbox" checked="checked" readonly="readonly"/></td>
                        <td width="10" valign="top" align="right"><xsl:value-of select="position()"/>. </td>
                        <td valign="top">
                             [<xsl:value-of select="@rank"/>] <xsl:value-of select="@title"/>
                        </td>
                   </tr>
         </table>
         <table border="00" cellpadding="3" width="100%">
                   <tr>
                        <td width="100"> </td>
                        <td valign="top">
                             <xsl:apply-templates/>
                        </td>
                   </tr>
         </table>
    </xsl:for-each>
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • Search for values in class

    Hi all,
    I am fetching data in the following manner,
    1.     Find the deliveries items based on the search criteria
    2.     Pull in the material numbers for each item in the delivery
    3.     Pull in Planned goods movement date LIKP-WADAT
    4.     Exclude materials in the list where MARA-MAGRV = TB01
    5.     Find the External material group value for the remaining list MARA-EXTWG
    6.     Search for values in class ZEHS_DATA
    7.     Pull in value for characteristics
    i.     ZEHS_PLANT
    ii.     ZEHS_RELEVANT
    8.     Eliminate delivery items where ZEHS_RELEVANT = N for next steps, however display what was found
    9.     With EMG for delivery items and ZEHS_RELEVANT = Y pull all fields.
    In which the class ZEHS-DATA is having fields like:
    ZEHS_FORM
    ZEHS_RELEVANT
    ZEHS_PLANT
    COLOR_SUNNBR etc,
    My question is how do I pull values from class ZEHS_DATA??
    Thanks,
    Debrup.

    Hi
    if you have values in a variable declared in CLASS, just call another method of this CLASS with an export paramtere ( export means exporting to the program)
    depending the requirement the method can be PUBLIC or PRIVATE etc
    Regards
    Ramchander Rao.K

  • Drill down capabilities for an alv grid display field using oops concept

    Hi All,
    could anyone help me in how to achieve the drill down capabilities for an alv grid display field using oops concept.
    Thanks & Regards,
    padmasri.

    padmasri,
    Hope your requirement is something like, when you click on a sales order number it should display that order (VA03), in a grid output displayed using set_table_for_first_display.
    you can acheive it using event double click.
    *&            L O C A L  C L A S S E S   -   D E F I N I T O N         *
    class lcl_event_receiver: local class to handle event DOUBLE_CLICK
    CLASS LCL_EVENT_RECEIVER DEFINITION.
      PUBLIC SECTION.
        METHODS:
        HANDLE_DOUBLE_CLICK
            FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                IMPORTING E_ROW E_COLUMN.
      PRIVATE SECTION.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    *&    L O C A L  C L A S S E S   -   I M P L E M E N T A T I O N       *
    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
      METHOD HANDLE_DOUBLE_CLICK.
        PERFORM HANDLE_DOUBLE_CLICK USING E_ROW
                                          E_COLUMN.
      ENDMETHOD.                           "handle_double_click
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    FORM HANDLE_DOUBLE_CLICK USING E_ROW    TYPE LVC_S_ROW
                                   E_COLUMN TYPE LVC_S_COL.
      DATA: LS_DETAIL LIKE LINE OF T_OUTPUT.
          WHEN 'T_OUTPUT'.
            READ TABLE T_OUTPUT   INDEX E_ROW-INDEX INTO LS_DETAIL.
    If clicked on PO Number or PO Item, call ME23
        IF E_COLUMN-FIELDNAME = 'EBELN' OR
           E_COLUMN-FIELDNAME = 'EBELP' .
          SET PARAMETER ID 'BES' FIELD LS_DETAIL-EBELN.
          SET PARAMETER ID 'BSP' FIELD LS_DETAIL-EBELP.
          CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
    If clicked on sales order number or item, call VA03
        ELSEIF E_COLUMN-FIELDNAME = 'VBELN' OR
               E_COLUMN-FIELDNAME = 'POSNR'.
          SET PARAMETER ID 'AUN' FIELD LS_DETAIL-VBELN.
          SET PARAMETER ID 'APO' FIELD LS_DETAIL-POSNR.
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    Hope this helps

  • LOV - Require User to always Search for Values option

    Hi All,
    I have build a Supervisor LOV,But when I click the LOV(Flash light Icon), the new LOV window opens and it fetches the entire list of Supervisors which takes lots of time and LOV times out in many of the cases.
    I want the LOV window should open without bringing the entire list of suprevisor and let User enter some Name to be searched.
    To achieve the same,I enabled the option
    Require User to always Search for Values option
    (Immediately Displays the Search Dialogue when LOV is exapnded)
    But it is not working.
    Is there a way to do it ??
    Regards
    Jujaar

    Hi Tamir,
    Thanks for you updates.
    I dont think so,that I need to create a table or Materialised view.Cause I am taking the data from per_all_people_f directly.All the employees who are managers.
    But I want that when users clicks on the LOV ,it should open and should force user to search for some employee .
    As of now it fetches the entire list while opening up,when the user clicks on LOV button.
    Thanks and Regards
    Jujaar Singh

  • How can I use SQL to search for a pattern within a field?

    Hello, Frank, Solomon, ect
    I am now faced with this particular scenario, I've got the SQL to search through a field to find text within the field, but I have to know what it is before it can look for it.
    What I have to do is this:
    Search through a field, for a pattern, and I won't know what the data is I am looking for. Can this be done in SQL?
    For instance, Here is my SQL this far, I was helped allot in order to get to this point.
    select table_name,
           column_name,
           :search_string search_string,
           result
      from (select column_name,
                   table_name,
                   'ora:view("' || table_name || '")/ROW/' || column_name || '[ora:contains(text(),"%' || :search_string || '%") > 0]' str
              from cols
             where table_name in ('TABLE1', 'TABLE2')),
           xmltable (str columns result varchar2(10) path '.')
    When you execute the above SQL, you have to pass in a value. What I really need is to alter the above SQL, to make it search for a pattern that exist's within the text of the field itself.
    Like for instance, lets say the pattern I am looking for is this" xx-xxxxx-xxxx" and it's somewhere in a field.
    I need to alter this SQL to take this pattern and search through all the schemas and tables to look for this pattern match.
    Can be done?

    When you use something dynamically within a function or procedure, roles do not apply and privileges must be granted directly.  So, you need to grant select on dba_tab_cols directly.  If you want to do pattern matching then you should use regular expressions.  The following example grants the proper privileges and uses regexp_instr to find all values containing the pattern xxx-xxxx-xxxx, where /S is used for any non-space character.  I limited the tables in order to save time and output for the test, but you can eliminate that where clause.
    SYS@orcl> CREATE USER test IDENTIFIED BY test
      2  /
    User created.
    SYS@orcl> ALTER USER test QUOTA UNLIMITED ON USERS
      2  /
    User altered.
    SYS@orcl> GRANT CREATE SESSION, CREATE TABLE TO test
      2  /
    Grant succeeded.
    SYS@orcl> GRANT SELECT ON dba_tab_cols TO test
      2  /
    Grant succeeded.
    SYS@orcl> CONNECT test/test
    Connected.
    TEST@orcl> SET LINESIZE 90
    TEST@orcl> CREATE TABLE table1
      2    (tab1_col1  VARCHAR2(60))
      3  /
    Table created.
    TEST@orcl> INSERT ALL
      2  INTO table1 (tab1_col1) VALUES ('xxx-xxxx-xxxx')
      3  INTO table1 (tab1_col1) VALUES ('matching abc-defg-hijk data')
      4  INTO table1 (tab1_col1) VALUES ('other data')
      5  SELECT * FROM DUAL
      6  /
    3 rows created.
    TEST@orcl> CREATE TABLE table2
      2    (tab2_col2  VARCHAR2(30))
      3  /
    Table created.
    TEST@orcl> INSERT ALL
      2  INTO table2 (tab2_col2) VALUES ('this BCD-EFGH-IJKL too')
      3  INTO table2 (tab2_col2) VALUES ('something else')
      4  SELECT * FROM DUAL
      5  /
    2 rows created.
    TEST@orcl> VAR search_string VARCHAR2(24)
    TEST@orcl> EXEC :search_string := '\S\S\S-\S\S\S\S-\S\S\S\S'
    PL/SQL procedure successfully completed.
    TEST@orcl> COLUMN "Searchword"     FORMAT A24
    TEST@orcl> COLUMN "Table"     FORMAT A6
    TEST@orcl> COLUMN "Column/Value" FORMAT A50
    TEST@orcl> SELECT DISTINCT SUBSTR (:search_string, 1, 24) "Searchword",
      2               SUBSTR (table_name, 1, 14) "Table",
      3               SUBSTR (t.column_value.getstringval (), 1, 50) "Column/Value"
      4  FROM   dba_tab_cols,
      5          TABLE
      6            (XMLSEQUENCE
      7           (DBMS_XMLGEN.GETXMLTYPE
      8              ( 'SELECT ' || column_name ||
      9               ' FROM ' || table_name ||
    10               ' WHERE REGEXP_INSTR
    11                     (UPPER (' || column_name || '),''' ||
    12                  UPPER (:search_string) || ''') > 0'
    13              ).extract ('ROWSET/ROW/*'))) t
    14  WHERE  table_name IN ('TABLE1', 'TABLE2')
    15  ORDER  BY "Table"
    16  /
    Searchword               Table  Column/Value
    \S\S\S-\S\S\S\S-\S\S\S\S TABLE1 <TAB1_COL1>matching abc-defg-hijk data</TAB1_COL1>
    \S\S\S-\S\S\S\S-\S\S\S\S TABLE1 <TAB1_COL1>xxx-xxxx-xxxx</TAB1_COL1>
    \S\S\S-\S\S\S\S-\S\S\S\S TABLE2 <TAB2_COL2>this BCD-EFGH-IJKL too</TAB2_COL2>
    3 rows selected.

  • How to search for value records for a specific period of time?

    Hi,
    I am building an application where I need to use BDB to store tons of call records.
    In the call records, I have the following fields:
    1. from-caller
    2. to-caller
    3. begin-time
    4. end-time
    5. account-code
    6. user-code
    I want to use end-time's microsecond representation to serve as the Key.
    So, how can I do the following data lookup?
    1. Search for all Value records between 2009-10-11 to now()
    2. Search for all Value records between 2009-10-11 to now() with account-code = 100
    3. Search for all Value records between 2009-10-11 to now() with account-code = 100 and user-code=10
    Is there any similar examples out there that I can refer to?
    Thanks,
    JB

    Hi,
    Btw, my operation is mostly:
    1. Append call records
    2. Search call records
    3. Remove ending records that are older than XX days
    Please kindly advise on how I should best structure the data to meet this purpose.
    Thanks,
    JB

  • Searching for values of authorization fields

    Is there a way to see the transaction codes or programs that makes use of a specific value of an authorization field?
    Example: K_PRICE001 has the following authorization fields.
                   BUKRS - Company Code 
                   WERKS - Plant        
                   CWPRICLABL - Price Type   
                   ACTVT - Activity     
    The permitted activities are "02" (Change) and "03" (Display).
    Can I find programs/transaction codes that use "02" only? or "03" only? or "*" for all?

    > What it does not do is show you what values are linked to it, that you have to do manually but atleast you would have a list to start with.
    Someone already did that and left all the information behind in the system for you - both check indicators (the capability of the transaction to control something) and proposals (the intended use of the transaction).
    They also update it with each support package, but it is nor 100% correct not a perfect match for all your intentions. You can use authorizations to tune it if you have set it up correctly in the first place...
    --> SU24.
    Cheers,
    Julius

  • Search for list items by Created Date using caml

    Hi all,
    I'm trying to find list items with specific attributes using caml.
    I created a caml query that uses Last_x0020_Modified and File_x0020_Size for searching items.
    then i tried adding Created and Created_x0020_Date both either as Lookup or as DateTime to the caml.
    But since i added Created/Created_x0020_Date my query fails with 500 Internal Server Error.
    Can someone tell me what I'm doing wrong?
    here is my complete Entity I'm sending to SharePoint 2013:
    {'query' : { '__metadata': { 'type': 'SP.CamlQuery' }, 'ViewXml': '<View Scope="Recursive">
    <Query>
    <Where>
    <And>
    <Leq>
    <FieldRef Name="Last_x0020_Modified" />
    <Value Type="Lookup">2015-02-25T10:10:03</Value>
    </Leq>
    <Geq>
    <FieldRef Name="File_x0020_Size" />
    <Value Type="Lookup">1</Value>
    </Geq>
    <Leq>
    <FieldRef Name="Created" />
    <Value Type="DateTime">2015-02-25T10:10:03</Value>
    </Leq>
    <Eq>
    <FieldRef Name="FileDirRef" />
    <Value Type="Text">/sites/DennisDevSite/alib/Ordner1</Value>
    </Eq>
    </And>
    </Where>
    </Query>
    </View>' } }
    Thx in advance
    Dennis

    Try appending "Z" to DateTime. Change 
    <Value Type="DateTime">2015-02-25T10:10:03</Value>to <Value Type="DateTime">2015-02-25T10:10:03Z</Value>
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • How to search for a flle in specific folder from forms 6i

    Hi all,
    I am using oracle forms 6i version.Now I have some pdf files in a specific folder.How can i search for a specific file in that folder from forms.Any help would be appreciated.Thanks in advance
    Regards
    Ranganath

    Hello,
    <p>Have a look at the d2kwutil library, tou can download on OTN.</p>
    Francois

  • How to Search for Collab Documents from Specific Collab Projects

    I am looking for some sample code that will use the portal Remote Search API to query for documents in Collaboration Server Only.
    I have a specific group of projects that I need to query. I can gather these in an Array --> IProjects[].
    The Collaboration Server Search portlet appears to have this capability already but I have to do it in a custom portlet.
    Thanks in advance.
    Phil Orion
    Orion like the constellation, not the Irish guy..

    Bump- Any takers --on this question?
    How about does anyone have any sample code to simply query for collab documents...
    Edited by: PhilOrion on Jul 3, 2010 5:28 PM

  • Preview glitch when searching for words on page and when using text tools to write comments/notes on .pdf slides, why?

    When using Preview to access my class notes as .pdf files, I have encountered extremely frustrating glitches when trying to search for specific words or phrases within the .pdf files and when trying to use 'text tools' to write notes on the .pdf slides.  Preview did not behave in this manor with Mountain Lion OS.  This seems to correlate with my recent upgrade to Mavericks OS.
    When using the search function you should be able to type in any number of letters or words and press enter to continually cycle through the highlighted findings that match what you have typed in.  Instead it now, typically, stops tracking what I type in after about 3-4 letters and the yellow highlight turns grey.  Once it does this if you try to press enter to cycle through what it has found it no longer cycles.  It never did this in Mountain Lion using the very same .pdf files I had previously used in the old OS, and it does this despite there being multiple matches for what I am searching.
    When clicking 'show edit tool bar' button and then 'text tools' button to be able to free text notes on the .pdf file I have to exit out of the 'text tools' mode to be able to advance to the next page.  This is extremely inconveneint and, again, Preview did not do this in Mountain Lion.
    These are my two major complaints about Preview that I have discovered so far in my short time using it with the new Mavericks OS.
    Any help would be very much appreciated.

    I have this issue too and was pleased to find this thread.  Did either of you find the source of the problem or how to fix it? 
    I've tried using Wondershare PDF Editor as well and wondered that had messed some settings up.  Have either of you used that? 
    If so, how would I revert to a clean version of Preview?
    Hope we can get this sorted. 

  • Custom search for Catalog based on UDF fields combination

    Can we customize in OIM 11g R2 PS1 to search catalog items based on multiple fields (similar to User search scenarios). If someone has to search based on combination of 2-3 custom attributes e.g. UDF fields , is it possible ? do we need to do complex changes in code through Catalog APIs ?
    Edited by: Shashi kiran on May 15, 2013 9:45 AM
    Edited by: Shashi kiran on May 15, 2013 9:49 AM

    In my scenario , i have to customize catalog search with combination of 2-3 attributes including UDF attributes with standard attributes (Application Instance, Role and Entitlement). As, these 3 attributes (Application Instance, Role and Entitlement) are by default out of box ,present for catalog search we can use their combination for catalog search.
    But, what if along with these standard attributes ,if there are other custom attribute like UDFs (e.g. : Sub application,Domain,etc) in combination ?
    Is this customization for catalog search is possible through UI or do we have to make changes in Source Code exposing catalog APIs to work this scenario out ?
    Edited by: Shashi kiran on May 16, 2013 12:06 PM

Maybe you are looking for

  • Client machine not reporting to wsus server

    My server Windows Server 2008 R2 Standard x 64 virtual machine install in Hyper-v server and Install SCE management version 2010. in sudden server stopped sending updated to client machine. So I check many and did many changed as per MS community for

  • Telling HD and SD versions apart

    Good day all, I recently downloaded an HD television series and as expected, each episode has an HD and an SD version. I realize that I can display the file size in iTunes and the larger of the two is the HD version.  But when I show the series entri

  • Using Webutil in oracle 10g forms

    Hi all I have a form that has a button for showing calendar which is configured using webutil. This form is not created by me. Now the problem is when the form is ran on web it does not show the calendar. Please suggest me how to solve the issue.

  • Reporting data in another database

    Is there in any mechanism to store reporting data in a database (Single table) using OBIEE without any customization ?

  • I am trying to download After Effects cs6 Trial. I am trying to download it from the download assist

    I am trying to download After Effects cs6 Trial. I am trying to download it from the download assistant tool. It keeps giving me error 107. (Cannot Communicate from error 107) I have tried restarting and reinstalling the assistant but it keeps giving