locked
SharePoint 2013 Custom Date Field, not able to search on Library level ( "Find in files" text box)": for Search Exports RRS feed

  • Question

  • Scenario
    The custom content type has 2 date and 1 text field. The first date field is date and the second is date and time only.

    Apparently text is searchable but the date field are not. What extra needs to be done if the date needs to appear in the search result. 
    Note: one thing is already known that SharePoint store the dates into UTC format, and when I am searching the date with regional settings +- UTC format. Then the date is searchable.

    this search is not working on Document Library level. That is when we want to search using the text box on the document library "Find in file" option. 

    Expected behavior: The date should be searchable in the exact format/text in which It has been entered in the Document library ( Remember the text and other values are searchable)?

    Any View?


    Labhesh Shrimali

    Wednesday, November 26, 2014 10:45 AM

Answers

  • Hi Labhesh,

    Did you use another time zone in your site?

    If yes, then you should use the time in UTC time zone for searching the item.

    As we all know that SharePoint stores the date in UTC time zone in database, so after crawling the database, the UTC value will be indexed, so we need to search with UTC date value.

    Please also make sure that the full crawl has been run after creating the managed property.

    Thanks,

    Victoria

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Victoria Xia
    TechNet Community Support

    Friday, November 28, 2014 1:19 AM

All replies

  • Hi Labhesh,

    I understand that you want to search the date field in the document library inline search.

    I recommend to use the managed property for the dates column in the query.

    For example, if the managed property for the date column is called testdate, then type “testdate:2014-11-28” in the search box in the library for searching the date.

    Thanks,

    Victoria

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Victoria Xia
    TechNet Community Support

    Thursday, November 27, 2014 8:42 AM
  • Hi Victoria,

    Thanks for quick reply, but unfortunately it is not working on my end and below is the details with screen shot, can you please point me out if there is any indifference in what I am doing.

    Managed Property Details

    List and Search inline date

    Search is done using 

    TestDateTimeOWSDATE:2014-11-22  and TestDateTimeOWSDATE:22-11-2014

    Thanks

    Labhesh


    Labhesh Shrimali

    Thursday, November 27, 2014 11:04 AM
  • Hi Victoria,

    I have also tried same thing as Labhesh mentioned. It didn't worked for me. Then I created another Managed Property of DateTime type and mapped it with correct crawled property. as mentioned in below blog,

    http://sharepointfieldnotes.blogspot.in/2013/05/understanding-and-getting-sharepoint.html

    But this time also no luck. It seems you are getting result as its searching content of file and not against the exact date column value.

    Can you please confirm and let me know any additional setting is there.

    • Edited by Rajavi Thursday, November 27, 2014 11:54 AM
    Thursday, November 27, 2014 11:52 AM
  • Hi Labhesh,

    Did you use another time zone in your site?

    If yes, then you should use the time in UTC time zone for searching the item.

    As we all know that SharePoint stores the date in UTC time zone in database, so after crawling the database, the UTC value will be indexed, so we need to search with UTC date value.

    Please also make sure that the full crawl has been run after creating the managed property.

    Thanks,

    Victoria

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Victoria Xia
    TechNet Community Support

    Friday, November 28, 2014 1:19 AM
  • Hi Victoria,

    I will give a try with changing the UTC timezone format and confirm you in some time. 

    From Microsoft Practice Point of view: 

    1. What should be the default timezone for the sites? Is it always good practice to follow UTC timezone only? 

    2. How the date time search scenario to be addressed if Client need specific timezone for different sites? Are we suggesting them to search the document by +- adding/subtracting hours from the UTC timezone and perform search? I do not see that this would be so good from the user usability point of view? So just want to understand what could be response from the solution point of view for different timezone?

    Thanks a lot for your extended support and answers on this so far !!

    -Labhesh


    Labhesh Shrimali

    Friday, November 28, 2014 2:12 AM
  • Hi Victoria,

    I confirm that if the site is configured with UTC reginal settings and if the search is performed using YYYY-MM-DD* format, the results will appear.

    However, I did not find answer from Microsoft/Blogs/links that how it will work when there are different timezone for the sites and user would like to search the documents. ( timezone calculation by users at the time of search is not expected behavior).


    Labhesh Shrimali

    Friday, November 28, 2014 6:48 AM