SP2013 Search - Query documents only in a library with a specific property bag value

Hi,
I am hoping someone might be able to help me as I am struggling to figure out how to get the following scenario to work using query variables. 
I have configured a property bag value against document libraries and made it indexable and turned it into a managed property. I have checked to ensure i can search specifically against this managed property and it works correctly and returns document libraries
which have a  property bag key with a value that I specify in a search query e.g. classification:internal.
I have also configured a managed property for a piece of metadata i collect against every document e.g. colour. I can successfully search against this manged property and return documents whereby colour is equal to red e.g. colour:red
What I would like to do is take this one step further and say search across only libraries where the property bag value equals internal and return documents within those libraries which have a metadata value of something e.g. colour = red.
Does anyone have any suggestions on how i can achieve this.
Thanks in advance
Mark

That or in some way get the container metadata to be present in the item itself as well.
Thanks,
Mikael Svenson - Search Enthusiast
SharePoint MVP/MCPD/P-TSP - If you find an answer useful, please up-vote it.
http://techmikael.blogspot.com/
Author of
SharePoint Search Queries Explained and
Working with FAST Search Server 2010 for SharePoint

Similar Messages

  • How can I limit searches to documents only, not emails?

    When I do a search for documents containing a particular word, I would like it to find documents -- not emails containing that word. How can I "turn off" searching emails?

    You can't. Although, the Spotlight show search results has mail and webpages listed only applies to Spotlight searches using CMD+spacebar or clicking on the Spotlight icon. At least that's what engineering responded when I filed a bug against that nonsensical behavior in Lion.
    After reviewing your submission engineering has determined that the behavior you reported is as expected/designed.
    The spotlight preferences set in the prefpane only apply to the spotlight menu in the menubar, not in the finder.
    All I can suggest is that you File an enhancement request with Apple asking them to restore the behavior to all Spotlight-based find operations. Do note that they'll most likely not do it.

  • Search query not able to find node under a specific site structure (eg. 2013/05)?

    Hi,
        We are saving our data on a node under year/month site structure, eg. (2013/05/node1) but when we search for the data using a query in a custom workflow., it does not fetch any results.The query being fired is something like :
       SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content/hm/NewsroomSection/en/NewsRoom/NewsroomDetails/2013/05/node1]) .
       On trying to run this query directly in crxde, it shows no result. But when we change the site structure to 2013/5/node1, it is able to fetch results.
       I am not sure if the problem is because of the '0' digit in the month in site structure (2013/05).
       Please provide your input if any of you have come across something like this before ..
    Thanks
    Abhishek

    Hi Abhishek,
    In case of nodes with numbers, any node starting with 0, this 0 gets omitted in the search query.
    So, if your node name is like 02013 for year, when it searches it omits 0 and searches for 2013.
    In case you want to search for your node, your SQL2 query should be like below:
    SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE(['/content/mysite/en/products/2013/05'])
    See screenshot for reference. This should return you the results.
    Hope this helps.
    I guess for more reference on SQL2 queries, you can refer to JCR 2.0 spec.
    http://www.day.com/specs/jcr/2.0/6_Query.html
    Also, you might want to look at the railroad diagrams and some examples from Jackrabbit's test cases:
    http://www.h2database.com/jcr/grammar.html
    http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/test/resources/or g/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt?view=markup
    Hope this helps.

  • SharePoint 2013 document library, permissions to upload and view shared document only

    SharePoint 2013 document library I want to give access to client where they can upload and view their uploaded document and can see all documents shared with them.
    I have managed to show all document shared with them only by deactivating a feature but now they can't upload any document, If I create a permission set to allow them to upload documents, they will see all other documents as well which are not shared with them.
    Any suggestions?

    Hi Sharaqat, the best way to handle your situation is to have a separate library or site for the client. You could use item level permissions per Thilosh, but fine-grained permissions become a major headache. You could also use web parts and audience
    targeting, but that's not truly secure.
    cameron rautmann
    I am thinking to have a separate document library for client, where they can upload/view/edit etc, we will upload documents in a "secure" library with a column saying this is a private document or public document, if we mark a document public,
    a workflow will move that document to the client's document library. I don't think there would be a problem to move a document from 1 library to another in a workflow.
    That's the easiest solution I have found so far.

  • How do I get my music from my IPod back in the library of my new computer, it tells me I can only Sync my IPod with one library but I don't have my old PC anymore?

    How can I Sync my IPod in ITune on a new PC and get the music from the IPod in the library and avoid this msg:
    You can only Sync one library with your IPod?

    Use the backup of the media and other important files from the old computer to put them on the new computer.
    iTunes only syncs with one computer/library at a time.
    If you have failed to maintain a backup or no longer have the old computer, you may be out of luck.
    iTunes purchases can be transfered from the iDevice.  Connect the device, do NOT sync.  Select File > Transfer Purchases.
    This will only transfer iTunes purchases.  All other media will not transfer and will be wiped from the device when it is synced with a new computer/library.

  • The search only shows my library - no store. have version 12.0.1.26

    The search only shows my library - no store. have version 12.0.1.26. Once I upgraded the search itunes store disappeared. Any ideas?

    What are you viewing when using the search box ? If you are in the store then it should search the store - is that not happening ?

  • How to modify edit/read mode pop up for documents in "SP2013" to open in only read only mode

    Hi,
    When opening a document the users of my site and including me are getting a pop up asking to open it in read only or edit mode. We want to disable the edit option for end users. Those are confidential doc's. 
    We want them to open only in read only mode. How can it be achieved.
    Can we FORCE a read-only open of the document without giving anyone the option to open in edit mode? I don't have access to Central Admin. Hence kindly let me know if there is some javascript
    code that i can use to do this from browser.
    thank you !

    Hi Prajk,
    If users have edit permission on the documents in this library, even if we disable this dialog (by disabling the add-on "SharePoint OpenDocuements class" from IE browser), the users sitll could download the documents to local machine, and
    edit the documents in client Office application, then sync to library.
    If you want the users to read these confidential documents only, you can only grant the users read-only permission on the document items or on library level, then they could unable to edit these confidential docs, note to give proper users
    proper permissions.
    If you also want that the confidential docs could be opend and read-only in client Office application, you can configure the IRM (implemented by RMS) for SharePoint server, then set the document items in the library read-only for
    some users.
    https://technet.microsoft.com/en-us/library/hh545607%28v=office.14%29.aspx?f=255&MSPPError=-2147217396
    https://support.office.com/en-in/article/Apply-Information-Rights-Management-to-a-list-or-library-6714cfe3-ef39-43b0-bb65-a887726bb63c?CorrelationId=ebcf6a01-1d3c-4b75-86ae-c11322065be6&ui=en-US&rs=en-IN&ad=IN
    Thanks
    Daniel Yang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Ultra Search query

    Question on what the syntax should be to perform a search query via Ultra Search revolving around 3 terms ("solaris","access control","buffer overflow").
    The search result should return documents which contain the words ("solaris" and "access control") OR the words ("solaris" and "buffer overflow").
    Currently can't even do ("solaris" and "access control"). When trying I get documents matching "solaris" | "access" | "control".
    Any advice appreciated.

    PS:
    you'll get documents only contains "solaris" too, but those should have very low score compare to the others,
    assuming you have documents containing the other terms.
    if you want to do (solaris and "access control") do
    solaris "access control"

  • Results web part showing results before search query is typed in search box

    2 part question
    I am creating a wiki site in which the home page has a search box web part, and a results web part.  I have the search box configured to return the results to the results web part.  I created a result source and changed the query on the results
    web part to use this results source.  I am getting results from the library I am trying to, but...
    1) The results web part is showing results when the page is loaded before any query is typed into the search bar.  Why is this and can it be configured to just be blank until a query is entered into the search bar?
    2) Is it possible to have 1 search box and 1 results part have 2 different scope choices?  ie, 1 scope for the wiki library and 1 for a document library?
    Thank you.

    So I have to have 2 different search result web parts to have 2 different scopes if I wish to have the search and results occur on the same page? Would I also have to have 2 search boxes?
    Also, I am trying to figure out this issue where results are being returned without anything being entered in the search box.  I have {searchterms?} in my query, and documentation suggests this to be the way to handle this issue, but I continue to get
    results shown in the results web part without even entering a search query.  Please assist.

  • Search query TREX

    Hi,
    I try to configure the KM iview search query to return only result by the name of documents(or part of name) and not as full text.
    For example, if i make a search on "TEST" i can see in the result page:
    - document.doc <i>(name of file)</i>
    this a <b>test</b> document <i>(full text search)</i>
    - test.doc <i>(name of file)</i>
    this is a new doc to..... <i>(full text search)</i>
    - example.doc <i>(name of file)</i>
    a sample for a <b>test</b> has been ....<i>(full text search)</i>
    and i need to see only:
    - test.doc <i>(name of file)</i>
    this is a new doc to..... <i>(full text search)</i>
    How configure the search to have this result?
    For your information i'm in EP7 SP10, TREX 7.0.06
    Thanks in advance,
    Xavier.

    Hi ,
    The custom QueryExtender works for custom property of type String and not for Timestamp property.
    If add Attribute query for Timestamp property with operator as less or equal to current date value, it doesn't work as below.
    returnList.addAttributeQuery(lPublishDateProp,currentDate,IQueryEntry.PROPERTY_OPERATOR_LESS_OR_EQUAL);
    lPublishDateProp - Customer property name of type Timestamp
    currentDate - String value of java.util.Date current date
    Any clue?
    Thanks,
    Siva

  • Search Query Web Part thumbnail image link broken

    Hello,
    I have 4 farms spread across the world and I want to pull news from Farm 1 (headquarters) into farm 2, 3, and 4. In SharePoint 2007 I did this with content deployment by pushing only the news site out to the other 3 farms.  However, from
    reading content deployment guidelines in SP13 I feel this is no longer a supported configuration.
    I am trying to use the search query web part to accomplish this now.  I have a search query web part that I am using to roll up articles from SharePoint at farm 1.  So far it is mostly working, the articles are pulled in and I can see
    them.  When I click the link it takes me from the current farm (farm 2) to farm 1 to read the article.  The only problem I am having is that the rollup image does not display at farm 2, 3, or 4.  I believe this is happening because the image
    URL at the source is getting saved as a relative URL.  Even if I try to override the relative URL to the image with an absolute URL then it just forces the URL back to a relative URL because clearly SharePoint is smarter than I am and there is no reason
    I should ever want an absolute URL.
    I should add that to get this working, in my search settings, I had to configure an extra content source (to farm 1).
    So my question is what is the best way to handle this?  Is there an option in my search configurations on farm 2 to override URL's for a particular content source?  Am I even headed down the right path trying to do this with the content search
    web part?
    Thanks,

    Hi Tom,
    I have been trying to figure out what you mean when you say I am using 'Page item' instead of 'Picture'.  I don't understand what you mean.
    When I set up a page that will be published I have actually been using an 'Article Page' content type for the news item I want to share on all of the farms.  After creating the page there is a section at the bottom for a 'Rollup Image'  I specify
    the URL in this rollup image but the actual image is stored in an 'Assets' Library.  I have no problem with the article page itself showing up on Farm 2, just not the image.  The "Rollup Image" data type is Publishing Image - "Rollup
    Image is a site column created by the Publishing feature. It is used on the Page Content Type as the image for the page shown in content roll-ups such as the Content By Search web part." 
    Question 1: Are you saying that I need to somehow replace that rollup image field with a custom site column field?
    Question 2: If I set up a new column then do I need to worry about connecting catalogs?
    In your post from December 9th it sounded like you had this working in your test environment. 
    Question 3: Did you have it working using a different configuration there? 
    Question 4: If so, did it require having a separate web application just for Assets, or were you using a custom site column there?
    In Farm 2, after I connected my catalog from Farm 1, I found that a Pages library at the top level of my site collection contained some strange entries. I have files in that library called
    CatalogItem--1684387697
    CatalogItem-364050575
    Category-
    Category-1211-4576
    The first CatalogItem gives me an error "Sorry, something went wrong".  The rest seem to contain images from Farm 1.  However, news articles still are not finding those images.  I suppose that is because the 'Rollup image' link is
    still pointing to a different path than that connected catalog.  Anyway, those items were checked out to me and were not published.  I checked them in and published those Category/CatalogItem connections hoping that would work, but
    that didn't help either.  
    When I set up my catalog in farm 1 I only checked 'Enable this library as a catalog'.  None of the other fields seemed to apply since I am not publishing to a public site (Anonymous access) and also since I am not trying to tie identifiers to catalog
    items (Catalog Item URL fields).  Additionally when I connected to my catalog I tried "<label for="ctl00_PlaceHolderMain_connectionTypeSection_fullConnection">Integrate the catalog into my site" with the setting "</label><label
    for="ctl00_PlaceHolderMain_rewriteDecisionSection_noURLRewriteRadioButton">Make URLs point to source catalog".  I also tried "</label><label for="ctl00_PlaceHolderMain_connectionTypeSection_manualConnection">Connect,
    but do not integrate the catalog".  Both of those settings sounded like they might force catalog items to look to the source (Farm 1).  Neither worked.  There are a lot of other settings but none of them seem to apply to my situation. 
    I'm not trying to configure Navigation Hierarchy, Category Pages, or Item Pages.  Maybe I need to do something with "Catalog Item URL Format", but I'm not sure what settings I should try.</label>
    Questions 5,6: Do you have recommendations for my catalog/catalog connections to get this working?  Obviously my current configuration is not right or else it would work, but am I even close?

  • Mandatory Input in Formatted Search Query Field

    I have created formatted search query. Which has only one field "Serial Number"?  I have to ensure that, the user has to enter the value in that field.  How to do that?
    I was thinking on implement in stored procedure SBO_TransactionNotification with Object_Type = "219". But I am not sure, how to enforce the validation only for this search query.  Because there are 50+ formatted search queries are available in the system.
    Please help

    Hi Suresh
    Check the below document
    How to SET a UDF field as Mandatory Does TNSP required for It?
    With Regards
    Balaji Sampath

  • Disable search Query Logging by powershell

    Hello,
    Could anyone advise how to disable Query Logging for sharepoint 2010 search service application by powershell?
    I found only option to check status ($searchapp.QueryLoggingEnabled) but I can not find any way to disable query logging.
    Thanks in advance
    Cheers

    Hi Przemeklwo,
    QueryLoggingEnabled property is already obsolete, so that perhaps you may not able to change the property directly.
    http://msdn.microsoft.com/en-us/library/microsoft.office.server.search.administration.searchserviceapplication.queryloggingenabled(v=office.15).aspx
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Search Scope that Only Returns Sites

    I'd like to create a search scope that only returns Sites. I don't want any documents, lists, items, or anything else in my results. How would I do this?Murray

    You can use ContentClass:STS_Web
    You can either create a scope or you can simply append it to any query using the search query web part. This would allow the user to search for "project1" and the executed query would be "project1 ContentClass:STS_Web" and therefor only return sites with project1 in the content.
    MCTS: SharePoint 2007, Web Applications
    MCPD: Web Developer
    My Blog: http://corypeters.net

  • Almost there; keyword search query need help

    I will want to eventually add more columns to search but
    wanted to get it working with story only for now. I think I am very
    close. I have a very simple form with a textfield and submit
    button. the search field has a binding Request.search variable
    assigned to it. My query works in the Recordset Dialog box, can
    enter a test value in simple mode and it works. I entered
    construction and get three stories containing construction.
    Main problem is that no matter what I search when testing
    through my browser using my pc's Inetpub/wwwroot I get all news
    stories. I can even type in a weird search word like zebra and
    still get all records.
    here is my simple form code
    <form id="form1" name="form1" method="get"
    action="keywordjimresults.asp">
    <input name="search" type="text" id="search"
    value="<%= Request("search") %>" />
    <br />
    <input type="submit" value="Search" />
    </form>
    Here is my results page code
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index
    Repeat1__numRows = 10
    Repeat1__index = 0
    rsKeyword_numRows = rsKeyword_numRows + Repeat1__numRows
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <table width="650" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td><form id="form1" name="form1" method="get"
    action="keywordjimresults.asp">
    <input name="search" type="text" id="search"
    value="<%= Request("search") %>" />
    <br />
    <input type="submit" value="Search" />
    </form> </td>
    <td rowspan="6"> </td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    </table>
    </body>
    </html>
    THANK YOU Jim

    I don't see anything at the bottom.
    Suggest  that you open the blank file to the size that you want, and the resolution the same as that of the picture.
    Bring both of these into view - tile view is good
    Drag picture to blank file. Do not drag from the project bin for this purpose
    You could also open the picture, go to Select>all, then Edit>copy. This will put it on the clipboard. Then in your destination, go to Edit>paste
    Resizing can be done in several ways. The least complicated way, in my opinion, is to use the crop tool, where you can enter the width and height in inches, and the resolution as well. The aspect ratio of the original picture may not conform to what you want. For example, a 4x6" picture has to be cropped in order to arrive at 1x1" - something has to go.

Maybe you are looking for